* [linux-next:master 13818/14024] mm/slub.c:5550:28: warning: passing argument 1 of '__do_kmalloc_node' makes pointer from integer without a cast
@ 2026-06-15 17:36 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-06-15 17:36 UTC (permalink / raw)
To: Vlastimil Babka (SUSE); +Cc: oe-kbuild-all, Hao Li, Suren Baghdasaryan
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 700f8f17ac2c84f94b7cf4420f306a23a5ddfd24
commit: ce190ed0166041cfab281967d46fe208f793a864 [13818/14024] mm/slab: introduce kmalloc_flags()
config: arm-randconfig-002-20260615 (https://download.01.org/0day-ci/archive/20260616/202606160125.fzducPRb-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260616/202606160125.fzducPRb-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/202606160125.fzducPRb-lkp@intel.com/
All warnings (new ones prefixed by >>):
mm/slub.c: In function '__kmalloc_flags_noprof':
>> mm/slub.c:5550:28: warning: passing argument 1 of '__do_kmalloc_node' makes pointer from integer without a cast [-Wint-conversion]
return __do_kmalloc_node(size, NULL, flags, node,
^~~~
mm/slub.c:5338:39: note: expected 'struct kmem_cache * (*)[14]' but argument is of type 'size_t' {aka 'unsigned int'}
void *__do_kmalloc_node(kmem_buckets *b, gfp_t flags, int node,
~~~~~~~~~~~~~~^
In file included from include/uapi/linux/posix_types.h:5,
from include/uapi/linux/types.h:14,
from include/linux/types.h:5,
from include/linux/kasan-checks.h:5,
from include/asm-generic/rwonce.h:26,
from ./arch/arm/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:369,
from include/linux/export.h:5,
from include/linux/linkage.h:7,
from arch/arm/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:7,
from mm/slub.c:15:
>> include/linux/stddef.h:8:14: warning: passing argument 2 of '__do_kmalloc_node' makes integer from pointer without a cast [-Wint-conversion]
#define NULL ((void *)0)
^~~~~~~~~~~
mm/slub.c:5550:34: note: in expansion of macro 'NULL'
return __do_kmalloc_node(size, NULL, flags, node,
^~~~
mm/slub.c:5338:48: note: expected 'gfp_t' {aka 'unsigned int'} but argument is of type 'void *'
void *__do_kmalloc_node(kmem_buckets *b, gfp_t flags, int node,
~~~~~~^~~~~
mm/slub.c:5550:47: error: incompatible type for argument 4 of '__do_kmalloc_node'
return __do_kmalloc_node(size, NULL, flags, node,
^~~~
mm/slub.c:5339:20: note: expected 'kmalloc_token_t' {aka 'struct <anonymous>'} but argument is of type 'int'
kmalloc_token_t token, struct slab_alloc_context *ac)
~~~~~~~~~~~~~~~~^~~~~
In file included from arch/arm/include/asm/pgtable-nommu.h:13,
from arch/arm/include/asm/pgtable.h:16,
from include/linux/pgtable.h:6,
from include/linux/mm.h:31,
from mm/slub.c:15:
include/linux/slab.h:512:34: error: incompatible type for argument 5 of '__do_kmalloc_node'
#define PASS_TOKEN_PARAM(_token) (_token)
^~~~~~~~
mm/slub.c:5551:5: note: in expansion of macro 'PASS_TOKEN_PARAM'
PASS_TOKEN_PARAM(token), &ac);
^~~~~~~~~~~~~~~~
mm/slub.c:5339:54: note: expected 'struct slab_alloc_context *' but argument is of type 'kmalloc_token_t' {aka 'struct <anonymous>'}
kmalloc_token_t token, struct slab_alloc_context *ac)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
mm/slub.c:5550:10: error: too many arguments to function '__do_kmalloc_node'
return __do_kmalloc_node(size, NULL, flags, node,
^~~~~~~~~~~~~~~~~
mm/slub.c:5338:7: note: declared here
void *__do_kmalloc_node(kmem_buckets *b, gfp_t flags, int node,
^~~~~~~~~~~~~~~~~
mm/slub.c:5556:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
vim +/__do_kmalloc_node +5550 mm/slub.c
5534
5535 /*
5536 * The only version of kmalloc_node() that takes alloc_flags and thus can
5537 * determine on its own whether to handle the allocation via kmalloc_nolock() or
5538 * normally
5539 */
5540 void *__kmalloc_flags_noprof(DECL_TOKEN_PARAMS(size, token), gfp_t flags,
5541 unsigned int alloc_flags, int node)
5542 {
5543 struct slab_alloc_context ac = {
5544 .caller_addr = _RET_IP_,
5545 .orig_size = size,
5546 .alloc_flags = alloc_flags,
5547 };
5548
5549 if (alloc_flags_allow_spinning(alloc_flags)) {
> 5550 return __do_kmalloc_node(size, NULL, flags, node,
5551 PASS_TOKEN_PARAM(token), &ac);
5552 } else {
5553 return __kmalloc_nolock_noprof(PASS_TOKEN_PARAMS(size, token),
5554 flags, node, &ac);
5555 }
5556 }
5557
--
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-06-15 17:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-15 17:36 [linux-next:master 13818/14024] mm/slub.c:5550:28: warning: passing argument 1 of '__do_kmalloc_node' makes pointer from integer without a cast 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.