Messages in this thread | | | Date | Fri, 23 Sep 2022 15:49:22 +0800 | From | kernel test robot <> | Subject | arch/riscv/kernel/probes/rethook.c:10:22: warning: no previous prototype for function 'arch_rethook_trampoline_callback' |
| |
tree: https://github.com/intel-lab-lkp/linux/commits/UPDATE-20220922-214607/Binglei-Wang/rethook-add-riscv-rethook-implementation/20220922-120748 head: 859acf9e4b9a99384f7a8085032c9844ea0fc4f6 commit: 859acf9e4b9a99384f7a8085032c9844ea0fc4f6 rethook: add riscv rethook implementation. date: 18 hours ago config: riscv-randconfig-r013-20220922 (https://download.01.org/0day-ci/archive/20220923/202209231518.BeRYebh5-lkp@intel.com/config) compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://github.com/intel-lab-lkp/linux/commit/859acf9e4b9a99384f7a8085032c9844ea0fc4f6 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review UPDATE-20220922-214607/Binglei-Wang/rethook-add-riscv-rethook-implementation/20220922-120748 git checkout 859acf9e4b9a99384f7a8085032c9844ea0fc4f6 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash arch/riscv/kernel/probes/
If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com>
Note: functions only called from assembly code should be annotated with the asmlinkage attribute All warnings (new ones prefixed by >>):
In file included from arch/riscv/kernel/probes/rethook.c:6: In file included from include/linux/kprobes.h:28: 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:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __raw_readb(PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 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' #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) ^ In file included from arch/riscv/kernel/probes/rethook.c:6: In file included from include/linux/kprobes.h:28: 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:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 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' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ In file included from arch/riscv/kernel/probes/rethook.c:6: In file included from include/linux/kprobes.h:28: 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:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writeb(value, PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port; ~~~~~~~~~~ ^ >> arch/riscv/kernel/probes/rethook.c:10:22: warning: no previous prototype for function 'arch_rethook_trampoline_callback' [-Wmissing-prototypes] unsigned long __used arch_rethook_trampoline_callback(struct pt_regs *regs) ^ arch/riscv/kernel/probes/rethook.c:10:1: note: declare 'static' if the function is not intended to be used outside of this translation unit unsigned long __used arch_rethook_trampoline_callback(struct pt_regs *regs) ^ static 8 warnings generated.
Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for DRM_TTM Depends on [n]: HAS_IOMEM [=y] && DRM [=m] && MMU [=n] Selected by [m]: - DRM_TTM_HELPER [=m] && HAS_IOMEM [=y] && DRM [=m] - DRM_HISI_HIBMC [=m] && HAS_IOMEM [=y] && DRM [=m] && PCI [=y] && (ARM64 || COMPILE_TEST [=y])
vim +/arch_rethook_trampoline_callback +10 arch/riscv/kernel/probes/rethook.c
8 9 /* This is called from arch_rethook_trampoline() */ > 10 unsigned long __used arch_rethook_trampoline_callback(struct pt_regs *regs) 11 { 12 return rethook_trampoline_handler(regs, regs->s0); 13 } 14 NOKPROBE_SYMBOL(arch_rethook_trampoline_callback); 15
-- 0-DAY CI Kernel Test Service https://01.org/lkp
| |