From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A39AECAAD8 for ; Fri, 23 Sep 2022 07:50:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230055AbiIWHuR (ORCPT ); Fri, 23 Sep 2022 03:50:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230119AbiIWHuN (ORCPT ); Fri, 23 Sep 2022 03:50:13 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9405D11C145 for ; Fri, 23 Sep 2022 00:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663919410; x=1695455410; h=date:from:to:cc:subject:message-id:mime-version; bh=541maJMIqeYc+trWLsc9+u0f7KuAV6zoN3csGgwaWiY=; b=QhVT+HbxyBfoc+Ncr/X1QNC+SeGOPARtRbZlmVdXVf/ec0vE0ZDJw866 RXvESkRXPM4WXNoBbtU0SYa5hSKih5V51lYXqU4airHnexCzTW07ZRcKs 9TpRKRCUXAi9zdm8DDI64xskaKtK4q9tkcX2cOvbXp4eTdv6G7PIBQDdQ p1M+zpBUCHBOh76DyHpW3rIRh2A+QYig4ZO6e+FdVu1QVHfCmAY2ifQ5M 0Q1kUHVT4MRkwQ9qA20gNSfVMO1IK6DNUDOU2nuQ2xZ/GlE4/1d4O3MSW RM8b4XJy9aMOKG2bXFY4fugDCEAyVLE6wdkBRj40aGIF20/XyJcRxvkJI Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="300522472" X-IronPort-AV: E=Sophos;i="5.93,337,1654585200"; d="scan'208";a="300522472" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 00:50:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,337,1654585200"; d="scan'208";a="948932919" Received: from lkp-server01.sh.intel.com (HELO c0a60f19fe7e) ([10.239.97.150]) by fmsmga005.fm.intel.com with ESMTP; 23 Sep 2022 00:50:08 -0700 Received: from kbuild by c0a60f19fe7e with local (Exim 4.96) (envelope-from ) id 1obdRn-0005RY-2P; Fri, 23 Sep 2022 07:50:07 +0000 Date: Fri, 23 Sep 2022 15:49:22 +0800 From: kernel test robot To: Binglei Wang Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, 0day robot Subject: arch/riscv/kernel/probes/rethook.c:10:22: warning: no previous prototype for function 'arch_rethook_trampoline_callback' Message-ID: <202209231518.BeRYebh5-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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