[soc:omap1-multiplatform-5.18 18/33] arch/arm/mach-omap1/timer32k.c:215:12: warning: no previous prototype for function 'omap_init_clocksource_32k'
kernel test robot
lkp at intel.com
Fri Apr 15 18:16:32 PDT 2022
tree: https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git omap1-multiplatform-5.18
head: fab2b1f2488cb81853e5e8c7d37d58963b8462bc
commit: 2f4dfef6e4950959786c965fefbb6aee6e4f0c67 [18/33] ARM: omap1: move 32k counter from plat-omap to mach-omap1
config: arm-omap1_defconfig (https://download.01.org/0day-ci/archive/20220416/202204160929.WuBwkKEz-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 6b7e6ea489f6dd45a9b0da9ac20871560917b9b0)
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/soc/soc.git/commit/?id=2f4dfef6e4950959786c965fefbb6aee6e4f0c67
git remote add soc https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git
git fetch --no-tags soc omap1-multiplatform-5.18
git checkout 2f4dfef6e4950959786c965fefbb6aee6e4f0c67
# 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
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All warnings (new ones prefixed by >>):
>> arch/arm/mach-omap1/timer32k.c:215:12: warning: no previous prototype for function 'omap_init_clocksource_32k' [-Wmissing-prototypes]
int __init omap_init_clocksource_32k(void __iomem *vbase)
^
arch/arm/mach-omap1/timer32k.c:215:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __init omap_init_clocksource_32k(void __iomem *vbase)
^
static
1 warning generated.
vim +/omap_init_clocksource_32k +215 arch/arm/mach-omap1/timer32k.c
205
206 /**
207 * omap_init_clocksource_32k - setup and register counter 32k as a
208 * kernel clocksource
209 * @pbase: base addr of counter_32k module
210 * @size: size of counter_32k to map
211 *
212 * Returns 0 upon success or negative error code upon failure.
213 *
214 */
> 215 int __init omap_init_clocksource_32k(void __iomem *vbase)
216 {
217 int ret;
218
219 /*
220 * 32k sync Counter IP register offsets vary between the
221 * highlander version and the legacy ones.
222 * The 'SCHEME' bits(30-31) of the revision register is used
223 * to identify the version.
224 */
225 if (readl_relaxed(vbase + OMAP2_32KSYNCNT_REV_OFF) &
226 OMAP2_32KSYNCNT_REV_SCHEME)
227 sync32k_cnt_reg = vbase + OMAP2_32KSYNCNT_CR_OFF_HIGH;
228 else
229 sync32k_cnt_reg = vbase + OMAP2_32KSYNCNT_CR_OFF_LOW;
230
231 /*
232 * 120000 rough estimate from the calculations in
233 * __clocksource_update_freq_scale.
234 */
235 clocks_calc_mult_shift(&persistent_mult, &persistent_shift,
236 32768, NSEC_PER_SEC, 120000);
237
238 ret = clocksource_mmio_init(sync32k_cnt_reg, "32k_counter", 32768,
239 250, 32, clocksource_mmio_readl_up);
240 if (ret) {
241 pr_err("32k_counter: can't register clocksource\n");
242 return ret;
243 }
244
245 sched_clock_register(omap_32k_read_sched_clock, 32, 32768);
246 register_persistent_clock(omap_read_persistent_clock64);
247 pr_info("OMAP clocksource: 32k_counter at 32768 Hz\n");
248
249 return 0;
250 }
251
--
0-DAY CI Kernel Test Service
https://01.org/lkp
More information about the linux-arm-kernel
mailing list