[atishp04:kvm_perf_rfc_snapshot 21/25] arch/riscv/kvm/vcpu_sbi_pmu.c:66:15: warning: no previous prototype for function 'kvm_sbi_ext_pmu_probe'

From: kernel test robot
Date: Sat Jul 30 2022 - 16:39:42 EST


tree: https://github.com/atishp04/linux kvm_perf_rfc_snapshot
head: 42182a0a79a8768e22fd70232c3aca2bc1a26a43
commit: 657de0362946d389f50e8b65f72da5f5ba0be1da [21/25] RISC-V: KVM: Add SBI PMU extension support
config: riscv-rv32_defconfig (https://download.01.org/0day-ci/archive/20220731/202207310426.hXMc5CaM-lkp@xxxxxxxxx/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 52cd00cabf479aa7eb6dbb063b7ba41ea57bce9e)
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-riscv-linux-gnu
# https://github.com/atishp04/linux/commit/657de0362946d389f50e8b65f72da5f5ba0be1da
git remote add atishp04 https://github.com/atishp04/linux
git fetch --no-tags atishp04 kvm_perf_rfc_snapshot
git checkout 657de0362946d389f50e8b65f72da5f5ba0be1da
# 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/kvm/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> arch/riscv/kvm/vcpu_sbi_pmu.c:66:15: warning: no previous prototype for function 'kvm_sbi_ext_pmu_probe' [-Wmissing-prototypes]
unsigned long kvm_sbi_ext_pmu_probe(unsigned long extid)
^
arch/riscv/kvm/vcpu_sbi_pmu.c:66:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
unsigned long kvm_sbi_ext_pmu_probe(unsigned long extid)
^
static
1 warning generated.


vim +/kvm_sbi_ext_pmu_probe +66 arch/riscv/kvm/vcpu_sbi_pmu.c

65
> 66 unsigned long kvm_sbi_ext_pmu_probe(unsigned long extid)
67 {
68 /*
69 * PMU Extension is only available to guests if privilege mode filtering
70 * is available. Otherwise, guest will always count events while the
71 * execution is in hypervisor mode.
72 */
73 return riscv_isa_extension_available(NULL, SSCOFPMF);
74 }
75

--
0-DAY CI Kernel Test Service
https://01.org/lkp