[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202208241125.5Pk8b711-lkp@intel.com>
Date: Wed, 24 Aug 2022 11:17:53 +0800
From: kernel test robot <lkp@...el.com>
To: Mark Rutland <mark.rutland@....com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [mark:arm64/alternatives/rework 17/18]
arch/arm64/kernel/alternative.c:146:6: warning: no previous prototype for
function 'summarize_alternatives'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/alternatives/rework
head: fad62c713602c963008575fd972d316569a32d12
commit: 6f13524469effb9785e5692389b94113f994c100 [17/18] HACK: dump summary of alternatives
config: arm64-randconfig-r022-20220823 (https://download.01.org/0day-ci/archive/20220824/202208241125.5Pk8b711-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project b04d01c009d7f66bcca9138d2ce40999eedf104d)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?id=6f13524469effb9785e5692389b94113f994c100
git remote add mark https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git
git fetch --no-tags mark arm64/alternatives/rework
git checkout 6f13524469effb9785e5692389b94113f994c100
# 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=arm64 SHELL=/bin/bash arch/arm64/kernel/ arch/arm64/mm/ kernel/events/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> arch/arm64/kernel/alternative.c:146:6: warning: no previous prototype for function 'summarize_alternatives' [-Wmissing-prototypes]
void summarize_alternatives(const struct alt_region *region)
^
arch/arm64/kernel/alternative.c:146:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void summarize_alternatives(const struct alt_region *region)
^
static
arch/arm64/kernel/alternative.c:330:14: warning: no previous prototype for function 'alt_cb_patch_nops' [-Wmissing-prototypes]
noinstr void alt_cb_patch_nops(struct alt_instr *alt, __le32 *origptr,
^
arch/arm64/kernel/alternative.c:330:9: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinstr void alt_cb_patch_nops(struct alt_instr *alt, __le32 *origptr,
^
static
2 warnings generated.
vim +/summarize_alternatives +146 arch/arm64/kernel/alternative.c
140
141 #define for_each_region_alt(region, alt) \
142 for (struct alt_instr *alt = (region)->begin; \
143 (alt) < (region)->end; \
144 (alt)++)
145
> 146 void summarize_alternatives(const struct alt_region *region)
147 {
148 unsigned int entries[ARM64_NCAPS] = { 0 };
149 unsigned int orig_len[ARM64_NCAPS] = { 0 };
150 unsigned int repl_len[ARM64_NCAPS] = { 0 };
151 unsigned int callbacks[ARM64_NCAPS] = { 0 };
152
153 unsigned int total_entries = 0;
154 unsigned int total_orig = 0;
155 unsigned int total_repl = 0;
156 unsigned int total_callbacks = 0;
157
158 for_each_region_alt(region, alt) {
159 int cap = ALT_CAP(alt);
160
161 entries[cap]++;
162 total_entries++;
163
164 orig_len[cap] += alt->orig_len;
165 total_orig += alt->orig_len;
166
167 repl_len[cap] += alt->alt_len;
168 total_repl += alt->alt_len;
169
170 if (ALT_HAS_CB(alt)) {
171 callbacks[cap]++;
172 total_callbacks++;
173 }
174 }
175
176 pr_info("Alternatives summary:\n"
177 " entries: %5d\n"
178 " instructions: %5d\n"
179 " replacements: %5d\n"
180 " callbacks: %5d\n",
181 total_entries,
182 total_orig / AARCH64_INSN_SIZE,
183 total_repl / AARCH64_INSN_SIZE,
184 total_callbacks);
185
186 for (int i = 0; i < ARM64_NCAPS; i++) {
187 if (!entries[i])
188 continue;
189
190 pr_info("cpucap %2d => entries: %5d orig: %5d, repl: %5d, cb: %5d\n",
191 i,
192 entries[i],
193 orig_len[i] / AARCH64_INSN_SIZE,
194 repl_len[i] / AARCH64_INSN_SIZE,
195 callbacks[i]);
196 }
197 }
198
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists