<div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Lorenzo,<br>
<br>
kernel test robot noticed the following build warnings:<br>
<br>
[auto build test WARNING on 1e24c4f2ee44be0eee94092b5d13cbdb4bdf0d60]<br>
<br>
url:    <a href="https://github.com/intel-lab-lkp/linux/commits/Lorenzo-Bianconi/net-stmmac-propagate-PTP-addend-and-system-time-programming-errors/20260920-150002" rel="noreferrer" target="_blank">https://github.com/intel-lab-lkp/linux/commits/Lorenzo-Bianconi/net-stmmac-propagate-PTP-addend-and-system-time-programming-errors/20260920-150002</a><br>
base:   1e24c4f2ee44be0eee94092b5d13cbdb4bdf0d60<br>
patch link:    <a href="https://lore.kernel.org/r/20260920-stmmac-ptp-added-systime-error-v1-1-8ac9e7a3fce2%40oss.qualcomm.com" rel="noreferrer" target="_blank">https://lore.kernel.org/r/20260920-stmmac-ptp-added-systime-error-v1-1-8ac9e7a3fce2%40oss.qualcomm.com</a><br>
patch subject: [PATCH net] net: stmmac: propagate PTP addend and system time programming errors<br>
config: arm-defconfig (<a href="https://download.01.org/0day-ci/archive/20260924/202609240727.6U1AzUEr-lkp@intel.com/config" rel="noreferrer" target="_blank">https://download.01.org/0day-ci/archive/20260924/202609240727.6U1AzUEr-lkp@intel.com/config</a>)<br>
compiler: clang version 24.0.0git (<a href="https://github.com/llvm/llvm-project" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project</a> 6e714c8d91116794cb699cdf80c26afe9cda3ef3)<br>
reproduce (this is a W=1 build): (<a href="https://download.01.org/0day-ci/archive/20260924/202609240727.6U1AzUEr-lkp@intel.com/reproduce" rel="noreferrer" target="_blank">https://download.01.org/0day-ci/archive/20260924/202609240727.6U1AzUEr-lkp@intel.com/reproduce</a>)<br>
<br>
If you fix the issue in a separate patch/commit (i.e. not just a new version of<br>
the same patch/commit), kindly add following tags<br>
| Reported-by: kernel test robot <<a href="mailto:lkp@intel.com" target="_blank">lkp@intel.com</a>><br>
| Closes: <a href="https://lore.kernel.org/oe-kbuild-all/202609240727.6U1AzUEr-lkp@intel.com/" rel="noreferrer" target="_blank">https://lore.kernel.org/oe-kbuild-all/202609240727.6U1AzUEr-lkp@intel.com/</a><br>
<br>
All warnings (new ones prefixed by >>):<br>
<br></blockquote><div><br></div><div>ack, I will fix the issue in v2.</div><div><br></div><div>Regards,</div><div>Lorenzo</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:613:2: warning: variable 'sec_inc' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]<br>
     613 |         stmmac_config_sub_second_increment(priv, priv->ptpaddr,<br>
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
     614 |                                            priv->plat->clk_ptp_rate,<br>
         |                                            ~~~~~~~~~~~~~~~~~~~~~~~~~<br>
     615 |                                            xmac, &sec_inc);<br>
         |                                            ~~~~~~~~~~~~~~~<br>
   drivers/net/ethernet/stmicro/stmmac/hwif.h:517:2: note: expanded from macro 'stmmac_config_sub_second_increment'<br>
     517 |         stmmac_do_void_callback(__priv, ptp, config_sub_second_increment, __args)<br>
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
   drivers/net/ethernet/stmicro/stmmac/hwif.h:15:6: note: expanded from macro 'stmmac_do_void_callback'<br>
      15 |         if ((__priv)->hw->__module && (__priv)->hw->__module->__cname) { \<br>
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:617:25: note: uninitialized use occurs here<br>
     617 |         priv->sub_second_inc = sec_inc;<br>
         |                                ^~~~~~~<br>
   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:613:2: note: remove the 'if' if its condition is always true<br>
     613 |         stmmac_config_sub_second_increment(priv, priv->ptpaddr,<br>
         |         ^<br>
   drivers/net/ethernet/stmicro/stmmac/hwif.h:517:2: note: expanded from macro 'stmmac_config_sub_second_increment'<br>
     517 |         stmmac_do_void_callback(__priv, ptp, config_sub_second_increment, __args)<br>
         |         ^<br>
   drivers/net/ethernet/stmicro/stmmac/hwif.h:15:2: note: expanded from macro 'stmmac_do_void_callback'<br>
      15 |         if ((__priv)->hw->__module && (__priv)->hw->__module->__cname) { \<br>
         |         ^<br>
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:613:2: warning: variable 'sec_inc' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]<br>
     613 |         stmmac_config_sub_second_increment(priv, priv->ptpaddr,<br>
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
     614 |                                            priv->plat->clk_ptp_rate,<br>
         |                                            ~~~~~~~~~~~~~~~~~~~~~~~~~<br>
     615 |                                            xmac, &sec_inc);<br>
         |                                            ~~~~~~~~~~~~~~~<br>
   drivers/net/ethernet/stmicro/stmmac/hwif.h:517:2: note: expanded from macro 'stmmac_config_sub_second_increment'<br>
     517 |         stmmac_do_void_callback(__priv, ptp, config_sub_second_increment, __args)<br>
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
   drivers/net/ethernet/stmicro/stmmac/hwif.h:15:6: note: expanded from macro 'stmmac_do_void_callback'<br>
      15 |         if ((__priv)->hw->__module && (__priv)->hw->__module->__cname) { \<br>
         |             ^~~~~~~~~~~~~~~~~~~~~~<br>
   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:617:25: note: uninitialized use occurs here<br>
     617 |         priv->sub_second_inc = sec_inc;<br>
         |                                ^~~~~~~<br>
   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:613:2: note: remove the '&&' if its condition is always true<br>
     613 |         stmmac_config_sub_second_increment(priv, priv->ptpaddr,<br>
         |         ^<br>
   drivers/net/ethernet/stmicro/stmmac/hwif.h:517:2: note: expanded from macro 'stmmac_config_sub_second_increment'<br>
     517 |         stmmac_do_void_callback(__priv, ptp, config_sub_second_increment, __args)<br>
         |         ^<br>
   drivers/net/ethernet/stmicro/stmmac/hwif.h:15:6: note: expanded from macro 'stmmac_do_void_callback'<br>
      15 |         if ((__priv)->hw->__module && (__priv)->hw->__module->__cname) { \<br>
         |             ^<br>
   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:609:13: note: initialize the variable 'sec_inc' to silence this warning<br>
     609 |         u32 sec_inc;<br>
         |                    ^<br>
         |                     = 0<br>
   2 warnings generated.<br>
<br>
<br>
vim +613 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c<br>
<br>
   603  <br>
   604  static void stmmac_restore_subsecond_increment(struct stmmac_priv *priv,<br>
   605                                                 u32 default_addend,<br>
   606                                                 u32 systime_flags)<br>
   607  {<br>
   608          bool xmac = dwmac_is_xmac(priv->plat->core_type);<br>
   609          u32 sec_inc;<br>
   610  <br>
   611          stmmac_config_addend(priv, priv->ptpaddr, default_addend);<br>
   612          stmmac_config_hw_tstamping(priv, priv->ptpaddr, systime_flags);<br>
 > 613          stmmac_config_sub_second_increment(priv, priv->ptpaddr,<br>
   614                                             priv->plat->clk_ptp_rate,<br>
   615                                             xmac, &sec_inc);<br>
   616          priv->default_addend = default_addend;<br>
   617          priv->sub_second_inc = sec_inc;<br>
   618  }<br>
   619  <br>
<br>
--<br>
0-DAY CI Kernel Test Service<br>
<a href="https://github.com/intel/lkp-tests/wiki" rel="noreferrer" target="_blank">https://github.com/intel/lkp-tests/wiki</a><br>
</blockquote></div></div>