Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [PATCH net] net: stmmac: propagate PTP addend and system time programming errors
       [not found] <20260920-stmmac-ptp-added-systime-error-v1-1-8ac9e7a3fce2@oss.qualcomm.com>
@ 2026-09-23 23:16 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-23 23:16 UTC (permalink / raw)
  To: Lorenzo Bianconi, Maxime Chevallier, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
	Alexandre Torgue, Richard Cochran, Jose Abreu
  Cc: llvm, oe-kbuild-all, netdev, linux-stm32, linux-arm-kernel,
	Lorenzo Bianconi

Hi Lorenzo,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 1e24c4f2ee44be0eee94092b5d13cbdb4bdf0d60]

url:    https://github.com/intel-lab-lkp/linux/commits/Lorenzo-Bianconi/net-stmmac-propagate-PTP-addend-and-system-time-programming-errors/20260920-150002
base:   1e24c4f2ee44be0eee94092b5d13cbdb4bdf0d60
patch link:    https://lore.kernel.org/r/20260920-stmmac-ptp-added-systime-error-v1-1-8ac9e7a3fce2%40oss.qualcomm.com
patch subject: [PATCH net] net: stmmac: propagate PTP addend and system time programming errors
config: arm-defconfig (https://download.01.org/0day-ci/archive/20260924/202609240727.6U1AzUEr-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 6e714c8d91116794cb699cdf80c26afe9cda3ef3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260924/202609240727.6U1AzUEr-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609240727.6U1AzUEr-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:613:2: warning: variable 'sec_inc' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
     613 |         stmmac_config_sub_second_increment(priv, priv->ptpaddr,
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     614 |                                            priv->plat->clk_ptp_rate,
         |                                            ~~~~~~~~~~~~~~~~~~~~~~~~~
     615 |                                            xmac, &sec_inc);
         |                                            ~~~~~~~~~~~~~~~
   drivers/net/ethernet/stmicro/stmmac/hwif.h:517:2: note: expanded from macro 'stmmac_config_sub_second_increment'
     517 |         stmmac_do_void_callback(__priv, ptp, config_sub_second_increment, __args)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/stmicro/stmmac/hwif.h:15:6: note: expanded from macro 'stmmac_do_void_callback'
      15 |         if ((__priv)->hw->__module && (__priv)->hw->__module->__cname) { \
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:617:25: note: uninitialized use occurs here
     617 |         priv->sub_second_inc = sec_inc;
         |                                ^~~~~~~
   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:613:2: note: remove the 'if' if its condition is always true
     613 |         stmmac_config_sub_second_increment(priv, priv->ptpaddr,
         |         ^
   drivers/net/ethernet/stmicro/stmmac/hwif.h:517:2: note: expanded from macro 'stmmac_config_sub_second_increment'
     517 |         stmmac_do_void_callback(__priv, ptp, config_sub_second_increment, __args)
         |         ^
   drivers/net/ethernet/stmicro/stmmac/hwif.h:15:2: note: expanded from macro 'stmmac_do_void_callback'
      15 |         if ((__priv)->hw->__module && (__priv)->hw->__module->__cname) { \
         |         ^
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:613:2: warning: variable 'sec_inc' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
     613 |         stmmac_config_sub_second_increment(priv, priv->ptpaddr,
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     614 |                                            priv->plat->clk_ptp_rate,
         |                                            ~~~~~~~~~~~~~~~~~~~~~~~~~
     615 |                                            xmac, &sec_inc);
         |                                            ~~~~~~~~~~~~~~~
   drivers/net/ethernet/stmicro/stmmac/hwif.h:517:2: note: expanded from macro 'stmmac_config_sub_second_increment'
     517 |         stmmac_do_void_callback(__priv, ptp, config_sub_second_increment, __args)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/stmicro/stmmac/hwif.h:15:6: note: expanded from macro 'stmmac_do_void_callback'
      15 |         if ((__priv)->hw->__module && (__priv)->hw->__module->__cname) { \
         |             ^~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:617:25: note: uninitialized use occurs here
     617 |         priv->sub_second_inc = sec_inc;
         |                                ^~~~~~~
   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:613:2: note: remove the '&&' if its condition is always true
     613 |         stmmac_config_sub_second_increment(priv, priv->ptpaddr,
         |         ^
   drivers/net/ethernet/stmicro/stmmac/hwif.h:517:2: note: expanded from macro 'stmmac_config_sub_second_increment'
     517 |         stmmac_do_void_callback(__priv, ptp, config_sub_second_increment, __args)
         |         ^
   drivers/net/ethernet/stmicro/stmmac/hwif.h:15:6: note: expanded from macro 'stmmac_do_void_callback'
      15 |         if ((__priv)->hw->__module && (__priv)->hw->__module->__cname) { \
         |             ^
   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:609:13: note: initialize the variable 'sec_inc' to silence this warning
     609 |         u32 sec_inc;
         |                    ^
         |                     = 0
   2 warnings generated.


vim +613 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

   603	
   604	static void stmmac_restore_subsecond_increment(struct stmmac_priv *priv,
   605						       u32 default_addend,
   606						       u32 systime_flags)
   607	{
   608		bool xmac = dwmac_is_xmac(priv->plat->core_type);
   609		u32 sec_inc;
   610	
   611		stmmac_config_addend(priv, priv->ptpaddr, default_addend);
   612		stmmac_config_hw_tstamping(priv, priv->ptpaddr, systime_flags);
 > 613		stmmac_config_sub_second_increment(priv, priv->ptpaddr,
   614						   priv->plat->clk_ptp_rate,
   615						   xmac, &sec_inc);
   616		priv->default_addend = default_addend;
   617		priv->sub_second_inc = sec_inc;
   618	}
   619	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-23 23:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260920-stmmac-ptp-added-systime-error-v1-1-8ac9e7a3fce2@oss.qualcomm.com>
2026-09-23 23:16 ` [PATCH net] net: stmmac: propagate PTP addend and system time programming errors 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