arch/arm/mach-omap1/timer32k.c:186: warning: cannot understand function prototype: 'struct timespec64 persistent_ts; '

From: kernel test robot
Date: Fri Oct 06 2023 - 13:44:31 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: af95dc6fdc25e616051d0234aad638e15c02ec8f
commit: d379e8899a8da1041c347ae5b792773c48a559a9 ARM: omap1: move 32k counter from plat-omap to mach-omap1
date: 1 year, 6 months ago
config: arm-omap1_defconfig (https://download.01.org/0day-ci/archive/20231007/202310070106.8QSyJOm3-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231007/202310070106.8QSyJOm3-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310070106.8QSyJOm3-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> arch/arm/mach-omap1/timer32k.c:186: warning: cannot understand function prototype: 'struct timespec64 persistent_ts; '
>> arch/arm/mach-omap1/timer32k.c:216: warning: Function parameter or member 'vbase' not described in 'omap_init_clocksource_32k'
>> arch/arm/mach-omap1/timer32k.c:216: warning: Excess function parameter 'pbase' description in 'omap_init_clocksource_32k'
>> arch/arm/mach-omap1/timer32k.c:216: warning: Excess function parameter 'size' description in 'omap_init_clocksource_32k'


vim +186 arch/arm/mach-omap1/timer32k.c

178
179 /**
180 * omap_read_persistent_clock64 - Return time from a persistent clock.
181 *
182 * Reads the time from a source which isn't disabled during PM, the
183 * 32k sync timer. Convert the cycles elapsed since last read into
184 * nsecs and adds to a monotonically increasing timespec64.
185 */
> 186 static struct timespec64 persistent_ts;
187 static cycles_t cycles;
188 static unsigned int persistent_mult, persistent_shift;
189
190 static void omap_read_persistent_clock64(struct timespec64 *ts)
191 {
192 unsigned long long nsecs;
193 cycles_t last_cycles;
194
195 last_cycles = cycles;
196 cycles = sync32k_cnt_reg ? readl_relaxed(sync32k_cnt_reg) : 0;
197
198 nsecs = clocksource_cyc2ns(cycles - last_cycles,
199 persistent_mult, persistent_shift);
200
201 timespec64_add_ns(&persistent_ts, nsecs);
202
203 *ts = persistent_ts;
204 }
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://github.com/intel/lkp-tests/wiki