* [alexshi:mmunstable 42/42] include/linux/mm.h:3025:9: warning: cast to 'const struct ptdesc *' from smaller integer type 'int'
@ 2024-07-22 10:36 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-07-22 10:36 UTC (permalink / raw)
To: Alex Shi (Tencent); +Cc: llvm, oe-kbuild-all
tree: https://github.com/alexshi/linux.git mmunstable
head: 0dc6582fabc5dcd9239957e6e6501344fd99714a
commit: 0dc6582fabc5dcd9239957e6e6501344fd99714a [42/42] mm/pgtable: prepare for pte_free_defer and its caller callee
config: riscv-randconfig-001-20240722 (https://download.01.org/0day-ci/archive/20240722/202407221807.2NfUdP7W-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project ad154281230d83ee551e12d5be48bb956ef47ed3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240722/202407221807.2NfUdP7W-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/202407221807.2NfUdP7W-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from arch/riscv/kernel/asm-offsets.c:10:
In file included from include/linux/mm.h:2221:
include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
514 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
In file included from arch/riscv/kernel/asm-offsets.c:10:
include/linux/mm.h:3025:21: error: call to undeclared function 'pmd_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
3025 | return page_ptdesc(pmd_page(*pmd));
| ^
>> include/linux/mm.h:3025:9: warning: cast to 'const struct ptdesc *' from smaller integer type 'int' [-Wint-to-pointer-cast]
3025 | return page_ptdesc(pmd_page(*pmd));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types.h:511:24: note: expanded from macro 'page_ptdesc'
511 | const struct page *: (const struct ptdesc *)(p), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/riscv/kernel/asm-offsets.c:10:
>> include/linux/mm.h:3025:9: warning: cast to 'struct ptdesc *' from smaller integer type 'int' [-Wint-to-pointer-cast]
3025 | return page_ptdesc(pmd_page(*pmd));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types.h:512:19: note: expanded from macro 'page_ptdesc'
512 | struct page *: (struct ptdesc *)(p)))
| ^~~~~~~~~~~~~~~~~~~~
In file included from arch/riscv/kernel/asm-offsets.c:10:
include/linux/mm.h:3025:21: error: controlling expression type 'int' not compatible with any generic association type
3025 | return page_ptdesc(pmd_page(*pmd));
| ^~~~~~~~~~~~~~
include/linux/mm_types.h:510:37: note: expanded from macro 'page_ptdesc'
510 | #define page_ptdesc(p) (_Generic((p), \
| ^
In file included from arch/riscv/kernel/asm-offsets.c:12:
In file included from include/linux/ftrace.h:10:
In file included from include/linux/trace_recursion.h:5:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:14:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:548:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
548 | val = __raw_readb(PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:561:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
561 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
| ^
In file included from arch/riscv/kernel/asm-offsets.c:12:
In file included from include/linux/ftrace.h:10:
In file included from include/linux/trace_recursion.h:5:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:14:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:574:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
574 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
| ^
In file included from arch/riscv/kernel/asm-offsets.c:12:
In file included from include/linux/ftrace.h:10:
In file included from include/linux/trace_recursion.h:5:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:14:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:585:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
585 | __raw_writeb(value, PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:595:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
595 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:605:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
605 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:744:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
744 | insb(addr, buffer, count);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:104:53: note: expanded from macro 'insb'
104 | #define insb(addr, buffer, count) __insb(PCI_IOBASE + (addr), buffer, count)
| ~~~~~~~~~~ ^
In file included from arch/riscv/kernel/asm-offsets.c:12:
In file included from include/linux/ftrace.h:10:
In file included from include/linux/trace_recursion.h:5:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:14:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:752:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
752 | insw(addr, buffer, count);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:105:53: note: expanded from macro 'insw'
105 | #define insw(addr, buffer, count) __insw(PCI_IOBASE + (addr), buffer, count)
| ~~~~~~~~~~ ^
In file included from arch/riscv/kernel/asm-offsets.c:12:
In file included from include/linux/ftrace.h:10:
In file included from include/linux/trace_recursion.h:5:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:14:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:760:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
760 | insl(addr, buffer, count);
vim +3025 include/linux/mm.h
3022
3023 static inline struct ptdesc *pmd_ptdesc(pmd_t *pmd)
3024 {
> 3025 return page_ptdesc(pmd_page(*pmd));
3026 }
3027
--
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-07-22 10:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-22 10:36 [alexshi:mmunstable 42/42] include/linux/mm.h:3025:9: warning: cast to 'const struct ptdesc *' from smaller integer type 'int' 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