[v1,1/1] minmax: Fix header inclusions

Message ID 20230721133932.12679-1-andriy.shevchenko@linux.intel.com
State New
Headers
Series [v1,1/1] minmax: Fix header inclusions |

Commit Message

Andy Shevchenko July 21, 2023, 1:39 p.m. UTC
  BUILD_BUG_ON*() are defined in build_bug.h.
It also provides __UNIQUE_ID() that is defined
in the compiler.h.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/minmax.h | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Herve Codina July 21, 2023, 2:10 p.m. UTC | #1
Hi Andy,

On Fri, 21 Jul 2023 16:39:32 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> BUILD_BUG_ON*() are defined in build_bug.h.
> It also provides __UNIQUE_ID() that is defined
> in the compiler.h.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  include/linux/minmax.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/minmax.h b/include/linux/minmax.h
> index 798c6963909f..049480235e53 100644
> --- a/include/linux/minmax.h
> +++ b/include/linux/minmax.h
> @@ -2,6 +2,7 @@
>  #ifndef _LINUX_MINMAX_H
>  #define _LINUX_MINMAX_H
>  
> +#include <linux/build_bug.h>
>  #include <linux/const.h>
>  
>  /*

Reviewed-by: Herve Codina <herve.codina@bootlin.com>

Best regards,
Hervé
  
kernel test robot July 21, 2023, 3:52 p.m. UTC | #2
Hi Andy,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on crng-random/master v6.5-rc2 next-20230721]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/minmax-Fix-header-inclusions/20230721-214152
base:   linus/master
patch link:    https://lore.kernel.org/r/20230721133932.12679-1-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v1 1/1] minmax: Fix header inclusions
config: um-allnoconfig (https://download.01.org/0day-ci/archive/20230721/202307212350.YQFKs9v6-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230721/202307212350.YQFKs9v6-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307212350.YQFKs9v6-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/um/os-Linux/sigio.c:6:
   In file included from include/linux/minmax.h:5:
   In file included from include/linux/build_bug.h:5:
>> include/linux/compiler.h:246:10: fatal error: 'asm/rwonce.h' file not found
     246 | #include <asm/rwonce.h>
         |          ^~~~~~~~~~~~~~
   1 error generated.


vim +246 include/linux/compiler.h

a9a3ed1eff3601 Borislav Petkov 2020-04-22  245  
e506ea451254ab Will Deacon     2019-10-15 @246  #include <asm/rwonce.h>
e506ea451254ab Will Deacon     2019-10-15  247
  
Andy Shevchenko July 21, 2023, 4:01 p.m. UTC | #3
On Fri, Jul 21, 2023 at 11:52:46PM +0800, kernel test robot wrote:
> Hi Andy,
> 
> kernel test robot noticed the following build errors:

Oh my...
UM without this header or even a stub?!

Hmm... Which one else? Let's wait a few days to see.

>    In file included from arch/um/os-Linux/sigio.c:6:
>    In file included from include/linux/minmax.h:5:
>    In file included from include/linux/build_bug.h:5:
> >> include/linux/compiler.h:246:10: fatal error: 'asm/rwonce.h' file not found
>      246 | #include <asm/rwonce.h>
>          |          ^~~~~~~~~~~~~~
  
kernel test robot July 21, 2023, 4:13 p.m. UTC | #4
Hi Andy,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on crng-random/master v6.5-rc2 next-20230721]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/minmax-Fix-header-inclusions/20230721-214152
base:   linus/master
patch link:    https://lore.kernel.org/r/20230721133932.12679-1-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v1 1/1] minmax: Fix header inclusions
config: um-randconfig-r021-20230720 (https://download.01.org/0day-ci/archive/20230721/202307212304.cH79zJp1-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230721/202307212304.cH79zJp1-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307212304.cH79zJp1-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from include/linux/build_bug.h:5,
                    from include/linux/minmax.h:5,
                    from arch/um/os-Linux/sigio.c:6:
>> include/linux/compiler.h:246:10: fatal error: asm/rwonce.h: No such file or directory
     246 | #include <asm/rwonce.h>
         |          ^~~~~~~~~~~~~~
   compilation terminated.


vim +246 include/linux/compiler.h

a9a3ed1eff3601 Borislav Petkov 2020-04-22  245  
e506ea451254ab Will Deacon     2019-10-15 @246  #include <asm/rwonce.h>
e506ea451254ab Will Deacon     2019-10-15  247
  
Andy Shevchenko July 24, 2023, 2:29 p.m. UTC | #5
On Fri, Jul 21, 2023 at 04:10:33PM +0200, Herve Codina wrote:
> On Fri, 21 Jul 2023 16:39:32 +0300
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> Reviewed-by: Herve Codina <herve.codina@bootlin.com>

Thank you!

Note, the https://lore.kernel.org/all/20230724142307.28411-1-andriy.shevchenko@linux.intel.com/
has a fix to the broken builds the LKP reported about.
  
Andy Shevchenko July 27, 2023, 1:10 p.m. UTC | #6
On Mon, Jul 24, 2023 at 05:29:25PM +0300, Andy Shevchenko wrote:
> On Fri, Jul 21, 2023 at 04:10:33PM +0200, Herve Codina wrote:
> > On Fri, 21 Jul 2023 16:39:32 +0300
> > Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> 
> > Reviewed-by: Herve Codina <herve.codina@bootlin.com>
> 
> Thank you!
> 
> Note, the https://lore.kernel.org/all/20230724142307.28411-1-andriy.shevchenko@linux.intel.com/
> has a fix to the broken builds the LKP reported about.

Andrew, since the build fix is in your tree, can you apply this one
on top of that, please?
  

Patch

diff --git a/include/linux/minmax.h b/include/linux/minmax.h
index 798c6963909f..049480235e53 100644
--- a/include/linux/minmax.h
+++ b/include/linux/minmax.h
@@ -2,6 +2,7 @@ 
 #ifndef _LINUX_MINMAX_H
 #define _LINUX_MINMAX_H
 
+#include <linux/build_bug.h>
 #include <linux/const.h>
 
 /*