All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kees Cook <kees@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Vlastimil Babka <vbabka@suse.cz>
Subject: include/linux/slab.h:552:15: error: type defaults to 'int' in declaration of 'kmem_buckets_create'
Date: Wed, 28 Aug 2024 05:21:04 +0800	[thread overview]
Message-ID: <202408280559.FIsoHAAc-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3ec3f5fc4a91e389ea56b111a73d97ffc94f19c6
commit: b32801d1255be1da62ea8134df3ed9f3331fba12 mm/slab: Introduce kmem_buckets_create() and family
date:   8 weeks ago
config: x86_64-randconfig-072-20240827 (https://download.01.org/0day-ci/archive/20240828/202408280559.FIsoHAAc-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240828/202408280559.FIsoHAAc-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/202408280559.FIsoHAAc-lkp@intel.com/

All errors (new ones prefixed by >>):

   arch/x86/include/asm/fpu/types.h:355:22: note: in expansion of macro 'PAGE_SIZE'
     355 |         u8 __padding[PAGE_SIZE];
         |                      ^~~~~~~~~
   arch/x86/include/asm/page_types.h:10:33: warning: "CONFIG_PAGE_SHIFT" is not defined, evaluates to 0 [-Wundef]
      10 | #define PAGE_SHIFT              CONFIG_PAGE_SHIFT
         |                                 ^~~~~~~~~~~~~~~~~
   arch/x86/include/asm/page_types.h:11:47: note: in expansion of macro 'PAGE_SHIFT'
      11 | #define PAGE_SIZE               (_AC(1,UL) << PAGE_SHIFT)
         |                                               ^~~~~~~~~~
   include/linux/mm_types.h:531:6: note: in expansion of macro 'PAGE_SIZE'
     531 | #if (PAGE_SIZE < PAGE_FRAG_CACHE_MAX_SIZE)
         |      ^~~~~~~~~
   In file included from include/vdso/const.h:5,
                    from include/linux/const.h:4,
                    from include/linux/list.h:9,
                    from include/linux/swait.h:5,
                    from include/linux/completion.h:12,
                    from include/linux/crypto.h:15,
                    from arch/x86/kernel/asm-offsets.c:9:
   arch/x86/include/asm/page_types.h:10:33: warning: "CONFIG_PAGE_SHIFT" is not defined, evaluates to 0 [-Wundef]
      10 | #define PAGE_SHIFT              CONFIG_PAGE_SHIFT
         |                                 ^~~~~~~~~~~~~~~~~
   include/uapi/linux/const.h:32:50: note: in definition of macro '__ALIGN_KERNEL_MASK'
      32 | #define __ALIGN_KERNEL_MASK(x, mask)    (((x) + (mask)) & ~(mask))
         |                                                  ^~~~
   include/linux/mm_types.h:508:41: note: in expansion of macro '__ALIGN_MASK'
     508 | #define PAGE_FRAG_CACHE_MAX_SIZE        __ALIGN_MASK(32768, ~PAGE_MASK)
         |                                         ^~~~~~~~~~~~
   arch/x86/include/asm/page_types.h:11:47: note: in expansion of macro 'PAGE_SHIFT'
      11 | #define PAGE_SIZE               (_AC(1,UL) << PAGE_SHIFT)
         |                                               ^~~~~~~~~~
   arch/x86/include/asm/page_types.h:12:36: note: in expansion of macro 'PAGE_SIZE'
      12 | #define PAGE_MASK               (~(PAGE_SIZE-1))
         |                                    ^~~~~~~~~
   include/linux/mm_types.h:508:62: note: in expansion of macro 'PAGE_MASK'
     508 | #define PAGE_FRAG_CACHE_MAX_SIZE        __ALIGN_MASK(32768, ~PAGE_MASK)
         |                                                              ^~~~~~~~~
   include/linux/mm_types.h:531:18: note: in expansion of macro 'PAGE_FRAG_CACHE_MAX_SIZE'
     531 | #if (PAGE_SIZE < PAGE_FRAG_CACHE_MAX_SIZE)
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/page_types.h:10:33: warning: "CONFIG_PAGE_SHIFT" is not defined, evaluates to 0 [-Wundef]
      10 | #define PAGE_SHIFT              CONFIG_PAGE_SHIFT
         |                                 ^~~~~~~~~~~~~~~~~
   include/uapi/linux/const.h:32:61: note: in definition of macro '__ALIGN_KERNEL_MASK'
      32 | #define __ALIGN_KERNEL_MASK(x, mask)    (((x) + (mask)) & ~(mask))
         |                                                             ^~~~
   include/linux/mm_types.h:508:41: note: in expansion of macro '__ALIGN_MASK'
     508 | #define PAGE_FRAG_CACHE_MAX_SIZE        __ALIGN_MASK(32768, ~PAGE_MASK)
         |                                         ^~~~~~~~~~~~
   arch/x86/include/asm/page_types.h:11:47: note: in expansion of macro 'PAGE_SHIFT'
      11 | #define PAGE_SIZE               (_AC(1,UL) << PAGE_SHIFT)
         |                                               ^~~~~~~~~~
   arch/x86/include/asm/page_types.h:12:36: note: in expansion of macro 'PAGE_SIZE'
      12 | #define PAGE_MASK               (~(PAGE_SIZE-1))
         |                                    ^~~~~~~~~
   include/linux/mm_types.h:508:62: note: in expansion of macro 'PAGE_MASK'
     508 | #define PAGE_FRAG_CACHE_MAX_SIZE        __ALIGN_MASK(32768, ~PAGE_MASK)
         |                                                              ^~~~~~~~~
   include/linux/mm_types.h:531:18: note: in expansion of macro 'PAGE_FRAG_CACHE_MAX_SIZE'
     531 | #if (PAGE_SIZE < PAGE_FRAG_CACHE_MAX_SIZE)
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/page.h:9,
                    from arch/x86/include/asm/thread_info.h:12,
                    from include/linux/thread_info.h:60,
                    from include/linux/spinlock.h:60,
                    from include/linux/swait.h:7,
                    from include/linux/completion.h:12,
                    from include/linux/crypto.h:15,
                    from arch/x86/kernel/asm-offsets.c:9:
   arch/x86/include/asm/page_types.h:10:33: warning: "CONFIG_PAGE_SHIFT" is not defined, evaluates to 0 [-Wundef]
      10 | #define PAGE_SHIFT              CONFIG_PAGE_SHIFT
         |                                 ^~~~~~~~~~~~~~~~~
   include/linux/mmzone.h:1757:23: note: in expansion of macro 'PAGE_SHIFT'
    1757 | #if (MAX_PAGE_ORDER + PAGE_SHIFT) > SECTION_SIZE_BITS
         |                       ^~~~~~~~~~
   In file included from include/linux/crypto.h:17,
                    from arch/x86/kernel/asm-offsets.c:9:
   include/linux/slab.h:431:21: error: type defaults to 'int' in declaration of 'kmalloc_caches' [-Werror=implicit-int]
     431 | extern kmem_buckets kmalloc_caches[NR_KMALLOC_TYPES];
         |                     ^~~~~~~~~~~~~~
   In file included from include/linux/container_of.h:5,
                    from include/linux/list.h:5,
                    from include/linux/swait.h:5,
                    from include/linux/completion.h:12,
                    from include/linux/crypto.h:15,
                    from arch/x86/kernel/asm-offsets.c:9:
   arch/x86/include/asm/page_types.h:10:33: error: expression in static assertion is not an integer
      10 | #define PAGE_SHIFT              CONFIG_PAGE_SHIFT
         |                                 ^~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
   include/linux/slab.h:527:1: note: in expansion of macro 'static_assert'
     527 | static_assert(PAGE_SHIFT <= 20);
         | ^~~~~~~~~~~~~
   include/linux/slab.h:527:15: note: in expansion of macro 'PAGE_SHIFT'
     527 | static_assert(PAGE_SHIFT <= 20);
         |               ^~~~~~~~~~
   In file included from include/linux/crypto.h:17,
                    from arch/x86/kernel/asm-offsets.c:9:
>> include/linux/slab.h:552:15: error: type defaults to 'int' in declaration of 'kmem_buckets_create' [-Werror=implicit-int]
     552 | kmem_buckets *kmem_buckets_create(const char *name, slab_flags_t flags,
         |               ^~~~~~~~~~~~~~~~~~~
   include/linux/slab.h:612:33: warning: 'assume_aligned' attribute argument <erroneous-expression> is not an integer constant [-Wattributes]
     612 |                                 __assume_page_alignment __alloc_size(1);
         |                                 ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/slab.h:615:33: warning: 'assume_aligned' attribute argument <erroneous-expression> is not an integer constant [-Wattributes]
     615 |                                 __assume_page_alignment __alloc_size(1);
         |                                 ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/slab.h: In function 'kmalloc_noprof':
   include/linux/slab.h:682:78: error: subscripted value is neither array nor pointer nor vector
     682 |                                 kmalloc_caches[kmalloc_type(flags, _RET_IP_)][index],
         |                                                                              ^
   include/linux/slab.h:675:30: warning: variable 'index' set but not used [-Wunused-but-set-variable]
     675 |                 unsigned int index;
         |                              ^~~~~
   include/linux/slab.h: In function 'kmalloc_node_noprof':
   include/linux/slab.h:705:78: error: subscripted value is neither array nor pointer nor vector
     705 |                                 kmalloc_caches[kmalloc_type(flags, _RET_IP_)][index],
         |                                                                              ^
   include/linux/slab.h:698:30: warning: variable 'index' set but not used [-Wunused-but-set-variable]
     698 |                 unsigned int index;
         |                              ^~~~~
   In file included from include/linux/container_of.h:5,
                    from include/linux/list.h:5,
                    from include/linux/swait.h:5,
                    from include/linux/completion.h:12,
                    from include/linux/crypto.h:15,
                    from arch/x86/kernel/asm-offsets.c:9:
   include/linux/highmem.h: In function 'memcpy_from_file_folio':
   include/linux/minmax.h:31:9: error: first argument to '__builtin_choose_expr' not a constant
      31 |         __builtin_choose_expr(__is_constexpr(is_signed_type(typeof(x))),        \
         |         ^~~~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
   include/linux/minmax.h:51:9: note: in expansion of macro 'static_assert'
      51 |         static_assert(__types_ok(x, y),                 \
         |         ^~~~~~~~~~~~~
   include/linux/minmax.h:39:28: note: in expansion of macro '__is_signed'
      39 |         (__is_signed(x) == __is_signed(y) ||                    \
         |                            ^~~~~~~~~~~
   include/linux/minmax.h:51:23: note: in expansion of macro '__types_ok'
      51 |         static_assert(__types_ok(x, y),                 \
         |                       ^~~~~~~~~~
   include/linux/minmax.h:58:17: note: in expansion of macro '__cmp_once'
      58 |                 __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
         |                 ^~~~~~~~~~
   include/linux/minmax.h:161:33: note: in expansion of macro '__careful_cmp'
     161 | #define min_t(type, x, y)       __careful_cmp(min, (type)(x), (type)(y))
         |                                 ^~~~~~~~~~~~~
   include/linux/highmem.h:596:23: note: in expansion of macro 'min_t'
     596 |                 len = min_t(size_t, len, PAGE_SIZE - offset);
         |                       ^~~~~
   include/linux/minmax.h:31:9: error: first argument to '__builtin_choose_expr' not a constant
      31 |         __builtin_choose_expr(__is_constexpr(is_signed_type(typeof(x))),        \
         |         ^~~~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
   include/linux/minmax.h:51:9: note: in expansion of macro 'static_assert'
      51 |         static_assert(__types_ok(x, y),                 \
         |         ^~~~~~~~~~~~~
   include/linux/minmax.h:40:41: note: in expansion of macro '__is_signed'
      40 |                 __is_signed((x) + 0) == __is_signed((y) + 0) || \
         |                                         ^~~~~~~~~~~
   include/linux/minmax.h:51:23: note: in expansion of macro '__types_ok'
      51 |         static_assert(__types_ok(x, y),                 \
         |                       ^~~~~~~~~~
   include/linux/minmax.h:58:17: note: in expansion of macro '__cmp_once'
      58 |                 __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
         |                 ^~~~~~~~~~
   include/linux/minmax.h:161:33: note: in expansion of macro '__careful_cmp'
     161 | #define min_t(type, x, y)       __careful_cmp(min, (type)(x), (type)(y))
         |                                 ^~~~~~~~~~~~~
   include/linux/highmem.h:596:23: note: in expansion of macro 'min_t'
     596 |                 len = min_t(size_t, len, PAGE_SIZE - offset);
         |                       ^~~~~
   include/linux/minmax.h:31:9: error: first argument to '__builtin_choose_expr' not a constant
      31 |         __builtin_choose_expr(__is_constexpr(is_signed_type(typeof(x))),        \
         |         ^~~~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
      78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                                        ^~~~
   include/linux/minmax.h:51:9: note: in expansion of macro 'static_assert'
      51 |         static_assert(__types_ok(x, y),                 \
         |         ^~~~~~~~~~~~~
   include/linux/minmax.h:36:53: note: in expansion of macro '__is_signed'
      36 |         (__builtin_choose_expr(__is_constexpr(x) && __is_signed(x), x, -1) >= 0)
         |                                                     ^~~~~~~~~~~
   include/linux/minmax.h:41:38: note: in expansion of macro '__is_noneg_int'
      41 |                 __is_noneg_int(x) || __is_noneg_int(y))
         |                                      ^~~~~~~~~~~~~~
   include/linux/minmax.h:51:23: note: in expansion of macro '__types_ok'
      51 |         static_assert(__types_ok(x, y),                 \
         |                       ^~~~~~~~~~
   include/linux/minmax.h:58:17: note: in expansion of macro '__cmp_once'
      58 |                 __cmp_once(op, x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y)))
         |                 ^~~~~~~~~~
   include/linux/minmax.h:161:33: note: in expansion of macro '__careful_cmp'
     161 | #define min_t(type, x, y)       __careful_cmp(min, (type)(x), (type)(y))


vim +552 include/linux/slab.h

   551	
 > 552	kmem_buckets *kmem_buckets_create(const char *name, slab_flags_t flags,
   553					  unsigned int useroffset, unsigned int usersize,
   554					  void (*ctor)(void *));
   555	

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

             reply	other threads:[~2024-08-27 21:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27 21:21 kernel test robot [this message]
2024-08-29  1:47 ` include/linux/slab.h:552:15: error: type defaults to 'int' in declaration of 'kmem_buckets_create' Kees Cook
2024-08-29  2:07   ` Philip Li

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=202408280559.FIsoHAAc-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=vbabka@suse.cz \
    /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.