Subject: Re: linux-next: build failure after merge of the scsi-mkp tree

From: Damien Le Moal <[email-masked]>
Date: Thu, 15 Jun 2023 13:19:56 +0900

On 6/15/23 12:43, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the scsi-mkp tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> In file included from <command-line>:
> ./usr/include/linux/ioprio.h:107:8: error: unknown type name '__always_inline'
>   107 | static __always_inline __u16 ioprio_value(int class, int level, int hint)
>       |        ^~~~~~~~~~~~~~~
> ./usr/include/linux/ioprio.h:107:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ioprio_value'
>   107 | static __always_inline __u16 ioprio_value(int class, int level, int hint)
>       |                              ^~~~~~~~~~~~
> 
> Caused by commit
> 
>   bfaaaa3d9d09 ("scsi: block: Improve ioprio value validity checks")
> 
> I have used the scsi-mkp tree from next-20230614 for today.

Not sure how this is triggered as I have no error compiling (using gcc)...

Martin,

I believe this should fix the issue:

diff --git a/include/uapi/linux/ioprio.h b/include/uapi/linux/ioprio.h
index 7310449c0178..92a769b9786d 100644
--- a/include/uapi/linux/ioprio.h
+++ b/include/uapi/linux/ioprio.h
@@ -2,6 +2,9 @@
 #ifndef _UAPI_LINUX_IOPRIO_H
 #define _UAPI_LINUX_IOPRIO_H

+#include <linux/stddef.h>
+#include <linux/types.h>
+
 /*
  * Gives us 8 prio classes with 13-bits of data for each class
  */

Could you squash this fix in the ioprio patch you just queued ? Or I can send a fix.

Thanks !

-- 
Damien Le Moal
Western Digital Research