[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202508131027.y3pyBEJQ-lkp@intel.com>
Date: Wed, 13 Aug 2025 10:35:26 +0800
From: kernel test robot <lkp@...el.com>
To: Wei Fang <wei.fang@....com>, robh@...nel.org, krzk+dt@...nel.org,
conor+dt@...nel.org, richardcochran@...il.com,
claudiu.manoil@....com, vladimir.oltean@....com,
xiaoning.wang@....com, andrew+netdev@...n.ch, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
vadim.fedorenko@...ux.dev, Frank.Li@....com, shawnguo@...nel.org,
s.hauer@...gutronix.de, festevam@...il.com
Cc: oe-kbuild-all@...ts.linux.dev, fushi.peng@....com,
devicetree@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, imx@...ts.linux.dev,
kernel@...gutronix.de
Subject: Re: [PATCH v3 net-next 06/15] ptp: netc: add periodic pulse output
support
Hi Wei,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/Wei-Fang/dt-bindings-ptp-add-NETC-Timer-PTP-clock/20250812-181510
base: net-next/main
patch link: https://lore.kernel.org/r/20250812094634.489901-7-wei.fang%40nxp.com
patch subject: [PATCH v3 net-next 06/15] ptp: netc: add periodic pulse output support
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20250813/202508131027.y3pyBEJQ-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 3769ce013be2879bf0b329c14a16f5cb766f26ce)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250813/202508131027.y3pyBEJQ-lkp@intel.com/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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508131027.y3pyBEJQ-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/ptp/ptp_netc.c:394:33: warning: variable 'pp' is uninitialized when used here [-Wuninitialized]
394 | priv->fs_alarm_bitmap &= ~BIT(pp->alarm_id);
| ^~
drivers/ptp/ptp_netc.c:348:20: note: initialize the variable 'pp' to silence this warning
348 | struct netc_pp *pp;
| ^
| = NULL
1 warning generated.
vim +/pp +394 drivers/ptp/ptp_netc.c
337
338 /* Note that users should not use this API to output PPS signal on
339 * external pins, because PTP_CLK_REQ_PPS trigger internal PPS event
340 * for input into kernel PPS subsystem. See:
341 * https://lore.kernel.org/r/20201117213826.18235-1-a.fatoum@pengutronix.de
342 */
343 static int netc_timer_enable_pps(struct netc_timer *priv,
344 struct ptp_clock_request *rq, int on)
345 {
346 struct device *dev = &priv->pdev->dev;
347 unsigned long flags;
348 struct netc_pp *pp;
349 int err = 0;
350
351 spin_lock_irqsave(&priv->lock, flags);
352
353 if (on) {
354 int alarm_id;
355 u8 channel;
356
357 if (priv->pps_channel < NETC_TMR_FIPER_NUM) {
358 channel = priv->pps_channel;
359 } else {
360 channel = netc_timer_select_pps_channel(priv);
361 if (channel == NETC_TMR_INVALID_CHANNEL) {
362 dev_err(dev, "No available FIPERs\n");
363 err = -EBUSY;
364 goto unlock_spinlock;
365 }
366 }
367
368 pp = &priv->pp[channel];
369 if (pp->enabled)
370 goto unlock_spinlock;
371
372 alarm_id = netc_timer_get_alarm_id(priv);
373 if (alarm_id == priv->fs_alarm_num) {
374 dev_err(dev, "No available ALARMs\n");
375 err = -EBUSY;
376 goto unlock_spinlock;
377 }
378
379 pp->enabled = true;
380 pp->type = NETC_PP_PPS;
381 pp->alarm_id = alarm_id;
382 pp->period = NSEC_PER_SEC;
383 priv->pps_channel = channel;
384
385 netc_timer_enable_periodic_pulse(priv, channel);
386 } else {
387 /* pps_channel is invalid if PPS is not enabled, so no
388 * processing is needed.
389 */
390 if (priv->pps_channel >= NETC_TMR_FIPER_NUM)
391 goto unlock_spinlock;
392
393 netc_timer_disable_periodic_pulse(priv, priv->pps_channel);
> 394 priv->fs_alarm_bitmap &= ~BIT(pp->alarm_id);
395 pp = &priv->pp[priv->pps_channel];
396 memset(pp, 0, sizeof(*pp));
397 priv->pps_channel = NETC_TMR_INVALID_CHANNEL;
398 }
399
400 unlock_spinlock:
401 spin_unlock_irqrestore(&priv->lock, flags);
402
403 return err;
404 }
405
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists