* [android-common:android16-6.12-2026-09 1/1] include/linux/slab.h:903:2: warning: cast to pointer from integer of different size
@ 2026-10-02 13:40 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-02 13:40 UTC (permalink / raw)
To: cros-kernel-buildreports; +Cc: oe-kbuild-all
tree: https://android.googlesource.com/kernel/common android16-6.12-2026-09
head: db9bd6c18b8007e430fb3e44723a93859aebee68
commit: 89ffa47ebb4b594af723bd02370a212dbac525bf [1/1] UPSTREAM: fscrypt: Replace mk_users keyring with simple list
config: arm64-randconfig-1002-20261002 (https://download.01.org/0day-ci/archive/20261002/202610022139.YlosHCVT-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261002/202610022139.YlosHCVT-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/202610022139.YlosHCVT-lkp@intel.com/
All warnings (new ones prefixed by >>):
fs/crypto/keyring.c: In function 'add_master_key_user':
include/linux/gfp.h:17:52: error: implicit declaration of function '__VA_OPT__'; did you mean '__CHAR_BIT__'? [-Werror=implicit-function-declaration]
#define default_gfp(...) __default_gfp(__VA_ARGS__ __VA_OPT__(,) GFP_KERNEL)
^
include/linux/alloc_tag.h:227:9: note: in definition of macro 'alloc_hooks_tag'
typeof(_do_alloc) _res; \
^~~~~~~~~
include/linux/slab.h:1119:25: note: in expansion of macro 'alloc_hooks'
#define kzalloc(...) alloc_hooks(kzalloc_noprof(__VA_ARGS__))
^~~~~~~~~~~
include/linux/slab.h:903:10: note: in expansion of macro 'kzalloc'
(TYPE *)KMALLOC(__obj_size, GFP); \
^~~~~~~
include/linux/slab.h:967:2: note: in expansion of macro '__alloc_objs'
__alloc_objs(kzalloc, default_gfp(__VA_ARGS__), typeof(P), 1)
^~~~~~~~~~~~
include/linux/gfp.h:17:26: note: in expansion of macro '__default_gfp'
#define default_gfp(...) __default_gfp(__VA_ARGS__ __VA_OPT__(,) GFP_KERNEL)
^~~~~~~~~~~~~
include/linux/slab.h:967:24: note: in expansion of macro 'default_gfp'
__alloc_objs(kzalloc, default_gfp(__VA_ARGS__), typeof(P), 1)
^~~~~~~~~~~
fs/crypto/keyring.c:359:12: note: in expansion of macro 'kzalloc_obj'
mk_user = kzalloc_obj(*mk_user);
^~~~~~~~~~~
include/linux/gfp.h:17:63: error: expected expression before ',' token
#define default_gfp(...) __default_gfp(__VA_ARGS__ __VA_OPT__(,) GFP_KERNEL)
^
include/linux/alloc_tag.h:227:9: note: in definition of macro 'alloc_hooks_tag'
typeof(_do_alloc) _res; \
^~~~~~~~~
include/linux/slab.h:1119:25: note: in expansion of macro 'alloc_hooks'
#define kzalloc(...) alloc_hooks(kzalloc_noprof(__VA_ARGS__))
^~~~~~~~~~~
include/linux/slab.h:903:10: note: in expansion of macro 'kzalloc'
(TYPE *)KMALLOC(__obj_size, GFP); \
^~~~~~~
include/linux/slab.h:967:2: note: in expansion of macro '__alloc_objs'
__alloc_objs(kzalloc, default_gfp(__VA_ARGS__), typeof(P), 1)
^~~~~~~~~~~~
include/linux/gfp.h:17:26: note: in expansion of macro '__default_gfp'
#define default_gfp(...) __default_gfp(__VA_ARGS__ __VA_OPT__(,) GFP_KERNEL)
^~~~~~~~~~~~~
include/linux/slab.h:967:24: note: in expansion of macro 'default_gfp'
__alloc_objs(kzalloc, default_gfp(__VA_ARGS__), typeof(P), 1)
^~~~~~~~~~~
fs/crypto/keyring.c:359:12: note: in expansion of macro 'kzalloc_obj'
mk_user = kzalloc_obj(*mk_user);
^~~~~~~~~~~
include/linux/gfp.h:17:63: error: expected expression before ',' token
#define default_gfp(...) __default_gfp(__VA_ARGS__ __VA_OPT__(,) GFP_KERNEL)
^
include/linux/alloc_tag.h:231:10: note: in definition of macro 'alloc_hooks_tag'
_res = _do_alloc; \
^~~~~~~~~
include/linux/slab.h:1119:25: note: in expansion of macro 'alloc_hooks'
#define kzalloc(...) alloc_hooks(kzalloc_noprof(__VA_ARGS__))
^~~~~~~~~~~
include/linux/slab.h:903:10: note: in expansion of macro 'kzalloc'
(TYPE *)KMALLOC(__obj_size, GFP); \
^~~~~~~
include/linux/slab.h:967:2: note: in expansion of macro '__alloc_objs'
__alloc_objs(kzalloc, default_gfp(__VA_ARGS__), typeof(P), 1)
^~~~~~~~~~~~
include/linux/gfp.h:17:26: note: in expansion of macro '__default_gfp'
#define default_gfp(...) __default_gfp(__VA_ARGS__ __VA_OPT__(,) GFP_KERNEL)
^~~~~~~~~~~~~
include/linux/slab.h:967:24: note: in expansion of macro 'default_gfp'
__alloc_objs(kzalloc, default_gfp(__VA_ARGS__), typeof(P), 1)
^~~~~~~~~~~
fs/crypto/keyring.c:359:12: note: in expansion of macro 'kzalloc_obj'
mk_user = kzalloc_obj(*mk_user);
^~~~~~~~~~~
include/linux/gfp.h:17:63: error: expected expression before ',' token
#define default_gfp(...) __default_gfp(__VA_ARGS__ __VA_OPT__(,) GFP_KERNEL)
^
include/linux/alloc_tag.h:234:10: note: in definition of macro 'alloc_hooks_tag'
_res = _do_alloc; \
^~~~~~~~~
include/linux/slab.h:1119:25: note: in expansion of macro 'alloc_hooks'
#define kzalloc(...) alloc_hooks(kzalloc_noprof(__VA_ARGS__))
^~~~~~~~~~~
include/linux/slab.h:903:10: note: in expansion of macro 'kzalloc'
(TYPE *)KMALLOC(__obj_size, GFP); \
^~~~~~~
include/linux/slab.h:967:2: note: in expansion of macro '__alloc_objs'
__alloc_objs(kzalloc, default_gfp(__VA_ARGS__), typeof(P), 1)
^~~~~~~~~~~~
include/linux/gfp.h:17:26: note: in expansion of macro '__default_gfp'
#define default_gfp(...) __default_gfp(__VA_ARGS__ __VA_OPT__(,) GFP_KERNEL)
^~~~~~~~~~~~~
include/linux/slab.h:967:24: note: in expansion of macro 'default_gfp'
__alloc_objs(kzalloc, default_gfp(__VA_ARGS__), typeof(P), 1)
^~~~~~~~~~~
fs/crypto/keyring.c:359:12: note: in expansion of macro 'kzalloc_obj'
mk_user = kzalloc_obj(*mk_user);
^~~~~~~~~~~
In file included from include/linux/crypto.h:17:0,
from include/crypto/skcipher.h:13,
from fs/crypto/keyring.c:22:
>> include/linux/slab.h:903:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
(TYPE *)KMALLOC(__obj_size, GFP); \
^
include/linux/slab.h:967:2: note: in expansion of macro '__alloc_objs'
__alloc_objs(kzalloc, default_gfp(__VA_ARGS__), typeof(P), 1)
^~~~~~~~~~~~
fs/crypto/keyring.c:359:12: note: in expansion of macro 'kzalloc_obj'
mk_user = kzalloc_obj(*mk_user);
^~~~~~~~~~~
cc1: some warnings being treated as errors
vim +903 include/linux/slab.h
ce6a50263d4dde Christoph Lameter 2013-01-10 889
ac46cdb098c8c6 Kees Cook 2026-07-16 890 /**
ac46cdb098c8c6 Kees Cook 2026-07-16 891 * __alloc_objs - Allocate objects of a given type using
ac46cdb098c8c6 Kees Cook 2026-07-16 892 * @KMALLOC: which size-based kmalloc wrapper to allocate with.
ac46cdb098c8c6 Kees Cook 2026-07-16 893 * @GFP: GFP flags for the allocation.
ac46cdb098c8c6 Kees Cook 2026-07-16 894 * @TYPE: type to allocate space for.
ac46cdb098c8c6 Kees Cook 2026-07-16 895 * @COUNT: how many @TYPE objects to allocate.
ac46cdb098c8c6 Kees Cook 2026-07-16 896 *
ac46cdb098c8c6 Kees Cook 2026-07-16 897 * Returns: Newly allocated pointer to (first) @TYPE of @COUNT-many
ac46cdb098c8c6 Kees Cook 2026-07-16 898 * allocated @TYPE objects, or NULL on failure.
ac46cdb098c8c6 Kees Cook 2026-07-16 899 */
ac46cdb098c8c6 Kees Cook 2026-07-16 900 #define __alloc_objs(KMALLOC, GFP, TYPE, COUNT) \
ac46cdb098c8c6 Kees Cook 2026-07-16 901 ({ \
ac46cdb098c8c6 Kees Cook 2026-07-16 902 const size_t __obj_size = size_mul(sizeof(TYPE), COUNT); \
ac46cdb098c8c6 Kees Cook 2026-07-16 @903 (TYPE *)KMALLOC(__obj_size, GFP); \
ac46cdb098c8c6 Kees Cook 2026-07-16 904 })
ac46cdb098c8c6 Kees Cook 2026-07-16 905
:::::: The code at line 903 was first introduced by commit
:::::: ac46cdb098c8c6a0a81e9f9d5714a30c811993a1 UPSTREAM: slab: Introduce kmalloc_obj() and family
:::::: TO: Kees Cook <kees@kernel.org>
:::::: CC: Carlos Llamas <cmllamas@google.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-02 13:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-02 13:40 [android-common:android16-6.12-2026-09 1/1] include/linux/slab.h:903:2: warning: cast to pointer from integer of different size kernel test robot
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.