[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202203101629.dia0kbU5-lkp@intel.com>
Date: Thu, 10 Mar 2022 16:34:45 +0800
From: kernel test robot <lkp@...el.com>
To: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: arch/arm/mm/proc-v7-bugs.c:111:15: warning: more '%' conversions
than data arguments
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3bf7edc84a9eb4007dd9a0cb8878a7e1d5ec6a3b
commit: 9dd78194a3722fa6712192cdd4f7032d45112a9a ARM: report Spectre v2 status through sysfs
date: 5 days ago
config: arm-randconfig-r035-20220310 (https://download.01.org/0day-ci/archive/20220310/202203101629.dia0kbU5-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 276ca87382b8f16a65bddac700202924228982f6)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9dd78194a3722fa6712192cdd4f7032d45112a9a
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 9dd78194a3722fa6712192cdd4f7032d45112a9a
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash arch/arm/mm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> arch/arm/mm/proc-v7-bugs.c:111:15: warning: more '%' conversions than data arguments [-Wformat-insufficient-args]
pr_info("CPU%u: Spectre V2: workarounds disabled by configuration\n");
~^
include/linux/printk.h:523:26: note: expanded from macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~
include/linux/printk.h:340:21: note: expanded from macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^~~
include/linux/printk.h:450:53: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
^~~
include/linux/printk.h:422:11: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
^~~~
arch/arm/mm/proc-v7-bugs.c:205:6: warning: no previous prototype for function 'cpu_v7_ca8_ibe' [-Wmissing-prototypes]
void cpu_v7_ca8_ibe(void)
^
arch/arm/mm/proc-v7-bugs.c:205:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void cpu_v7_ca8_ibe(void)
^
static
arch/arm/mm/proc-v7-bugs.c:211:6: warning: no previous prototype for function 'cpu_v7_ca15_ibe' [-Wmissing-prototypes]
void cpu_v7_ca15_ibe(void)
^
arch/arm/mm/proc-v7-bugs.c:211:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void cpu_v7_ca15_ibe(void)
^
static
arch/arm/mm/proc-v7-bugs.c:217:6: warning: no previous prototype for function 'cpu_v7_bugs_init' [-Wmissing-prototypes]
void cpu_v7_bugs_init(void)
^
arch/arm/mm/proc-v7-bugs.c:217:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void cpu_v7_bugs_init(void)
^
static
4 warnings generated.
vim +111 arch/arm/mm/proc-v7-bugs.c
65
66 static unsigned int spectre_v2_install_workaround(unsigned int method)
67 {
68 const char *spectre_v2_method = NULL;
69 int cpu = smp_processor_id();
70
71 if (per_cpu(harden_branch_predictor_fn, cpu))
72 return SPECTRE_MITIGATED;
73
74 switch (method) {
75 case SPECTRE_V2_METHOD_BPIALL:
76 per_cpu(harden_branch_predictor_fn, cpu) =
77 harden_branch_predictor_bpiall;
78 spectre_v2_method = "BPIALL";
79 break;
80
81 case SPECTRE_V2_METHOD_ICIALLU:
82 per_cpu(harden_branch_predictor_fn, cpu) =
83 harden_branch_predictor_iciallu;
84 spectre_v2_method = "ICIALLU";
85 break;
86
87 case SPECTRE_V2_METHOD_HVC:
88 per_cpu(harden_branch_predictor_fn, cpu) =
89 call_hvc_arch_workaround_1;
90 cpu_do_switch_mm = cpu_v7_hvc_switch_mm;
91 spectre_v2_method = "hypervisor";
92 break;
93
94 case SPECTRE_V2_METHOD_SMC:
95 per_cpu(harden_branch_predictor_fn, cpu) =
96 call_smc_arch_workaround_1;
97 cpu_do_switch_mm = cpu_v7_smc_switch_mm;
98 spectre_v2_method = "firmware";
99 break;
100 }
101
102 if (spectre_v2_method)
103 pr_info("CPU%u: Spectre v2: using %s workaround\n",
104 smp_processor_id(), spectre_v2_method);
105
106 return SPECTRE_MITIGATED;
107 }
108 #else
109 static unsigned int spectre_v2_install_workaround(unsigned int method)
110 {
> 111 pr_info("CPU%u: Spectre V2: workarounds disabled by configuration\n");
112
113 return SPECTRE_VULNERABLE;
114 }
115 #endif
116
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists