All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jakub Kicinski <kuba@kernel.org>, davem@davemloft.net
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
	andrew+netdev@lunn.ch, horms@kernel.org,
	Jakub Kicinski <kuba@kernel.org>,
	dhowells@redhat.com, kees@kernel.org, gustavoars@kernel.org,
	aleksander.lobakin@intel.com, tstruk@gigaio.com
Subject: Re: [PATCH net-next] stddef: don't include compiler_types.h in the uAPI header
Date: Tue, 19 Aug 2025 17:26:14 +0800	[thread overview]
Message-ID: <202508191741.O5OYysnF-lkp@intel.com> (raw)
In-Reply-To: <20250818181848.799566-1-kuba@kernel.org>

Hi Jakub,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Jakub-Kicinski/stddef-don-t-include-compiler_types-h-in-the-uAPI-header/20250819-022023
base:   net-next/main
patch link:    https://lore.kernel.org/r/20250818181848.799566-1-kuba%40kernel.org
patch subject: [PATCH net-next] stddef: don't include compiler_types.h in the uAPI header
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20250819/202508191741.O5OYysnF-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250819/202508191741.O5OYysnF-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/202508191741.O5OYysnF-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   In file included from <built-in>:3:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/auxclock.h:5:
   In file included from include/uapi/linux/time.h:5:
>> include/linux/types.h:265:21: error: field has incomplete type 'struct task_struct'
     265 |         struct task_struct __rcu *task;
         |                            ^
   include/linux/types.h:265:9: note: forward declaration of 'struct task_struct'
     265 |         struct task_struct __rcu *task;
         |                ^
>> include/linux/types.h:265:26: error: expected ';' at end of declaration list
     265 |         struct task_struct __rcu *task;
         |                                 ^
         |                                 ;
   In file included from <built-in>:3:
   In file included from lib/vdso/gettimeofday.c:6:
   In file included from include/vdso/datapage.h:7:
   In file included from include/linux/compiler.h:5:
   In file included from include/linux/compiler_types.h:89:
>> include/linux/compiler_attributes.h:55:9: warning: '__always_inline' macro redefined [-Wmacro-redefined]
      55 | #define __always_inline                 inline __attribute__((__In file included from arch/arm64/kernel/vdso32/note.c:11:
   In file included from include/linux/elfnote.h:62:
   In file included from include/uapi/linux/elf.h:5:
>> include/linux/types.h:265:21: error: field has incomplete type 'struct task_struct'
   alw  ays_inline__))
         |         ^
   include/uapi/linux/stddef.h:6:9: note: previous definition is here
       6 | #define __always_inline inline
         |         ^
   265 |         struct task_struct __rcu *task;
         |                            ^
   In file included from <built-in>:3:
   In file included from lib/vdso/gettimeofday.c:6:
   In file included from include/vdso/datapage.h:7:
   In file included from include/linux/compiler.h:5:
>> include/linux/compiler_types.h:346:10: warning: '__counted_by' macro redefined [-Wmacro-redefined]
     346 | # define __counted_by(member)           __attribute__((__counted_by__(member)))
         |          ^
   include/uapi/linux/stddef.h:60:9: note: previous definition is here
      60 | #define __counted_by(m)
         |         ^
   In file included from include/linux/types.h:265:9: note: forward declaration of 'struct task_struct'
     265 |         struct task_struct __rcu *task;
         |                ^
   <built-in>:3:
   In file included from lib/vdso/gettimeofday.c:6:
   In file included from include/vdso/datapage.h:7:
   In file included from include/linux/compiler.h:5:
>> include/linux/compiler_types.h:367include/linux/types.h:265:26: error: expected ';' at end of declaration list
   :  265 |         struct task_struct __rcu *task;
         |                                 ^
         |                                 ;
   9: warning: '__counted_by_le' macro redefined [-Wmacro-redefined]
     367 | #define __counted_by_le(member) __counted_by(member)
         |         ^
   include/uapi/linux/stddef.h:64:9: note: previous definition is here
      64 | #define __counted_by_le(m)
         |         ^
   In file included from <built-in>:3:
   In file included from lib/vdso/gettimeofday.c:6:
   In file included from include/vdso/datapage.h:7:
   In file included from include/linux/compiler.h:5:
>> include/linux/compiler_types.h:368:9: warning: '__counted_by_be' macro redefined [-Wmacro-redefined]
     368 | #define __counted_by_be(member)
         |         ^
   include/uapi/linux/stddef.h:68:9: note: previous definition is here
      68 | #define __counted_by_be(m)
         |         ^
>> error: expected ';' after struct
>> arch/arm64/kernel/vdso32/note.c:14:1: error: unknown type name '_note_14'
      14 | ELFNOTE32("Linux", 0, LINUX_VERSION_CODE);
         | ^
   include/linux/elfnote.h:95:37: note: expanded from macro 'ELFNOTE32'
      95 | #define ELFNOTE32(name, type, desc) ELFNOTE(32, name, type, desc)
         |                                     ^
   include/linux/elfnote.h:93:2: note: expanded from macro 'ELFNOTE'
      93 |         _ELFNOTE(size, name, __LINE__, type, desc)
         |         ^
   include/linux/elfnote.h:79:4: note: expanded from macro '_ELFNOTE'
      79 |         } _ELFNOTE_PASTE(_note_, unique)                                \
         |           ^
   include/linux/elfnote.h:71:29: note: expanded from macro '_ELFNOTE_PASTE'
      71 | #define _ELFNOTE_PASTE(a,b)     a##b
         |                                 ^
   <scratch space>:11:1: note: expanded from here
      11 | _note_14
         | ^
>> error: expected ';' after struct
>> arch/arm64/kernel/vdso32/note.c:15:1: error: unknown type name '_note_15'
      15 | BUILD_SALT;
         | ^
   include/linux/build-salt.h:16:8: note: expanded from macro 'BUILD_SALT'
      16 |        ELFNOTE32("Linux", LINUX_ELFNOTE_BUILD_SALT, CONFIG_BUILD_SALT)
         |        ^
   include/linux/elfnote.h:95:37: note: expanded from macro 'ELFNOTE32'
      95 | #define ELFNOTE32(name, type, desc) ELFNOTE(32, name, type, desc)
         |                                     ^
   include/linux/elfnote.h:93:2: note: expanded from macro 'ELFNOTE'
      93 |         _ELFNOTE(size, name, __LINE__, type, desc)
         |         ^
   include/linux/elfnote.h:79:4: note: expanded from macro '_ELFNOTE'
      79 |         } _ELFNOTE_PASTE(_note_, unique)                                \
         |           ^
   include/linux/elfnote.h:71:29: note: expanded from macro '_ELFNOTE_PASTE'
      71 | #define _ELFNOTE_PASTE(a,b)     a##b
         |                                 ^
   <scratch space>:21:1: note: expanded from here
      21 | _note_15
         | ^
   6 errors generated.
   make[3]: *** [arch/arm64/kernel/vdso32/Makefile:144: arch/arm64/kernel/vdso32/note.o] Error 1
   4 warnings and 2 errors generated.
   make[3]: *** [arch/arm64/kernel/vdso32/Makefile:146: arch/arm64/kernel/vdso32/vgettimeofday.o] Error 1
   make[3]: Target 'arch/arm64/kernel/vdso32/vdso.so' not remade because of errors.
   make[2]: *** [arch/arm64/Makefile:208: vdso_prepare] Error 2
   make[2]: Target 'prepare' not remade because of errors.
   make[1]: *** [Makefile:248: __sub-make] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:248: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +/__always_inline +55 include/linux/compiler_attributes.h

86cffecdeaa278 Kees Cook    2021-11-05  45  
a3f8a30f3f0079 Miguel Ojeda 2018-08-30  46  /*
a3f8a30f3f0079 Miguel Ojeda 2018-08-30  47   * Note: users of __always_inline currently do not write "inline" themselves,
a3f8a30f3f0079 Miguel Ojeda 2018-08-30  48   * which seems to be required by gcc to apply the attribute according
a3f8a30f3f0079 Miguel Ojeda 2018-08-30  49   * to its docs (and also "warning: always_inline function might not be
a3f8a30f3f0079 Miguel Ojeda 2018-08-30  50   * inlinable [-Wattributes]" is emitted).
a3f8a30f3f0079 Miguel Ojeda 2018-08-30  51   *
a3f8a30f3f0079 Miguel Ojeda 2018-08-30  52   *   gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-always_005finline-function-attribute
a3f8a30f3f0079 Miguel Ojeda 2018-08-30  53   * clang: mentioned
a3f8a30f3f0079 Miguel Ojeda 2018-08-30  54   */
a3f8a30f3f0079 Miguel Ojeda 2018-08-30 @55  #define __always_inline                 inline __attribute__((__always_inline__))
a3f8a30f3f0079 Miguel Ojeda 2018-08-30  56  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      parent reply	other threads:[~2025-08-19  9:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-18 18:18 [PATCH net-next] stddef: don't include compiler_types.h in the uAPI header Jakub Kicinski
2025-08-19  4:06 ` Kees Cook
2025-08-20 17:17   ` Jakub Kicinski
2025-08-26  2:54     ` Kees Cook
2025-08-26 13:47       ` Jakub Kicinski
2025-08-19  9:26 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202508191741.O5OYysnF-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=edumazet@google.com \
    --cc=gustavoars@kernel.org \
    --cc=horms@kernel.org \
    --cc=kees@kernel.org \
    --cc=kuba@kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=tstruk@gigaio.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.