* [linux-next:master 6350/9759] drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c:342:9: error: call to undeclared function 'ptp_find_pin_unlocked'; ISO C99 and later do not support implicit function declarations
@ 2022-05-07 3:07 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-05-07 3:07 UTC (permalink / raw)
To: Horatiu Vultur; +Cc: llvm, kbuild-all, Linux Memory Management List
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 38a288f5941ef03752887ad86f2d85442358c99a
commit: f3d8e0a9c28ba0bb3716dd5e8697a075ea36fdd8 [6350/9759] net: lan966x: Add support for PTP_PF_EXTTS
config: arm64-randconfig-r011-20220506 (https://download.01.org/0day-ci/archive/20220507/202205071105.X9CbIhTA-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5e004fb787698440a387750db7f8028e7cb14cfc)
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/next/linux-next.git/commit/?id=f3d8e0a9c28ba0bb3716dd5e8697a075ea36fdd8
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout f3d8e0a9c28ba0bb3716dd5e8697a075ea36fdd8
# 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 drivers/net/ethernet/microchip/lan966x/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Note: the linux-next/master HEAD 38a288f5941ef03752887ad86f2d85442358c99a builds fine.
It may have been fixed somewhere.
All errors (new ones prefixed by >>):
>> drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c:342:9: error: call to undeclared function 'ptp_find_pin_unlocked'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
pin = ptp_find_pin_unlocked(phc->clock, PTP_PF_EXTTS, 0);
^
1 error generated.
vim +/ptp_find_pin_unlocked +342 drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
323
324 irqreturn_t lan966x_ptp_ext_irq_handler(int irq, void *args)
325 {
326 struct lan966x *lan966x = args;
327 struct lan966x_phc *phc;
328 unsigned long flags;
329 u64 time = 0;
330 time64_t s;
331 int pin, i;
332 s64 ns;
333
334 if (!(lan_rd(lan966x, PTP_PIN_INTR)))
335 return IRQ_NONE;
336
337 /* Go through all domains and see which pin generated the interrupt */
338 for (i = 0; i < LAN966X_PHC_COUNT; ++i) {
339 struct ptp_clock_event ptp_event = {0};
340
341 phc = &lan966x->phc[i];
> 342 pin = ptp_find_pin_unlocked(phc->clock, PTP_PF_EXTTS, 0);
343 if (pin == -1)
344 continue;
345
346 if (!(lan_rd(lan966x, PTP_PIN_INTR) & BIT(pin)))
347 continue;
348
349 spin_lock_irqsave(&lan966x->ptp_clock_lock, flags);
350
351 /* Enable to get the new interrupt.
352 * By writing 1 it clears the bit
353 */
354 lan_wr(BIT(pin), lan966x, PTP_PIN_INTR);
355
356 /* Get current time */
357 s = lan_rd(lan966x, PTP_TOD_SEC_MSB(pin));
358 s <<= 32;
359 s |= lan_rd(lan966x, PTP_TOD_SEC_LSB(pin));
360 ns = lan_rd(lan966x, PTP_TOD_NSEC(pin));
361 ns &= PTP_TOD_NSEC_TOD_NSEC;
362
363 spin_unlock_irqrestore(&lan966x->ptp_clock_lock, flags);
364
365 if ((ns & 0xFFFFFFF0) == 0x3FFFFFF0) {
366 s--;
367 ns &= 0xf;
368 ns += 999999984;
369 }
370 time = ktime_set(s, ns);
371
372 ptp_event.index = pin;
373 ptp_event.timestamp = time;
374 ptp_event.type = PTP_CLOCK_EXTTS;
375 ptp_clock_event(phc->clock, &ptp_event);
376 }
377
378 return IRQ_HANDLED;
379 }
380
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-07 3:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-07 3:07 [linux-next:master 6350/9759] drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c:342:9: error: call to undeclared function 'ptp_find_pin_unlocked'; ISO C99 and later do not support implicit function declarations kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox