arch/arm64/kernel/proton-pack.c:775:14: warning: no previous prototype for 'spectre_bhb_patch_loop_mitigation_enable'

From: kernel test robot
Date: Sat Jul 23 2022 - 19:02:06 EST


Hi James,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 515f71412bb73ebd7f41f90e1684fc80b8730789
commit: ba2689234be92024e5635d30fe744f4853ad97db arm64: entry: Add vectors that have the bhb mitigation sequences
date: 5 months ago
config: arm64-alldefconfig (https://download.01.org/0day-ci/archive/20220724/202207240659.cxSiTCFF-lkp@xxxxxxxxx/config)
compiler: aarch64-linux-gcc (GCC) 12.1.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ba2689234be92024e5635d30fe744f4853ad97db
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ba2689234be92024e5635d30fe744f4853ad97db
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kernel/

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/arm64/kernel/proton-pack.c:537:13: warning: no previous prototype for 'spectre_v4_patch_fw_mitigation_enable' [-Wmissing-prototypes]
537 | void __init spectre_v4_patch_fw_mitigation_enable(struct alt_instr *alt,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/proton-pack.c:557:13: warning: no previous prototype for 'smccc_patch_fw_mitigation_conduit' [-Wmissing-prototypes]
557 | void __init smccc_patch_fw_mitigation_conduit(struct alt_instr *alt,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/arm64/kernel/proton-pack.c:775:14: warning: no previous prototype for 'spectre_bhb_patch_loop_mitigation_enable' [-Wmissing-prototypes]
775 | void noinstr spectre_bhb_patch_loop_mitigation_enable(struct alt_instr *alt,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/arm64/kernel/proton-pack.c:783:14: warning: no previous prototype for 'spectre_bhb_patch_fw_mitigation_enabled' [-Wmissing-prototypes]
783 | void noinstr spectre_bhb_patch_fw_mitigation_enabled(struct alt_instr *alt,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/spectre_bhb_patch_loop_mitigation_enable +775 arch/arm64/kernel/proton-pack.c

773
774 /* Patched to NOP when enabled */
> 775 void noinstr spectre_bhb_patch_loop_mitigation_enable(struct alt_instr *alt,
776 __le32 *origptr,
777 __le32 *updptr, int nr_inst)
778 {
779 BUG_ON(nr_inst != 1);
780 }
781
782 /* Patched to NOP when enabled */
> 783 void noinstr spectre_bhb_patch_fw_mitigation_enabled(struct alt_instr *alt,

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