* [namhyung-perf:bpf/slab-iter-v4 2/3] mm/slab_common.c:1334:23: error: incompatible integer to pointer conversion passing 'u64' (aka 'unsigned long long') to parameter of type 'const void *'
@ 2024-10-03 22:45 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-03 22:45 UTC (permalink / raw)
To: Namhyung Kim; +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git bpf/slab-iter-v4
head: 2941faf08c4c0c782881cfe9e8b7e1b6432a6212
commit: 96ce888c02ed7cf7278c4d4d14bab67c1db4b673 [2/3] mm/bpf: Add bpf_get_kmem_cache() kfunc
config: arm-randconfig-002-20241004 (https://download.01.org/0day-ci/archive/20241004/202410040606.o9Sk5WgC-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project fef3566a25ff0e34fb87339ba5e13eca17cec00f)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241004/202410040606.o9Sk5WgC-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/202410040606.o9Sk5WgC-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from mm/slab_common.c:9:
In file included from include/linux/mm.h:2213:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
In file included from mm/slab_common.c:32:
In file included from mm/internal.h:13:
include/linux/mm_inline.h:47:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
47 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
| ~~~~~~~~~~~ ^ ~~~
include/linux/mm_inline.h:49:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
49 | NR_ZONE_LRU_BASE + lru, nr_pages);
| ~~~~~~~~~~~~~~~~ ^ ~~~
>> mm/slab_common.c:1334:23: error: incompatible integer to pointer conversion passing 'u64' (aka 'unsigned long long') to parameter of type 'const void *' [-Wint-conversion]
1334 | if (!virt_addr_valid(addr))
| ^~~~
arch/arm/include/asm/memory.h:392:31: note: expanded from macro 'virt_addr_valid'
392 | && pfn_valid(virt_to_pfn(kaddr)))
| ^~~~~
arch/arm/include/asm/memory.h:296:53: note: passing argument to parameter 'p' here
296 | static inline unsigned long virt_to_pfn(const void *p)
| ^
3 warnings and 1 error generated.
vim +1334 mm/slab_common.c
1329
1330 __bpf_kfunc struct kmem_cache *bpf_get_kmem_cache(u64 addr)
1331 {
1332 struct slab *slab;
1333
> 1334 if (!virt_addr_valid(addr))
1335 return NULL;
1336
1337 slab = virt_to_slab((void *)(long)addr);
1338 return slab ? slab->slab_cache : NULL;
1339 }
1340
--
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:[~2024-10-03 22:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-03 22:45 [namhyung-perf:bpf/slab-iter-v4 2/3] mm/slab_common.c:1334:23: error: incompatible integer to pointer conversion passing 'u64' (aka 'unsigned long long') to parameter of type 'const void *' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).