Hi Sudarsana,

[auto build test WARNING on net-next/master]

url:    
https://github.com/0day-ci/linux/commits/Yuval-Mintz/qed-Add-infrastructure-for-PTP-support/20170215-003051
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/qlogic/qed/qed_ptp.c: In function 'qed_ptp_hw_adjfreq':
>> drivers/net/ethernet/qlogic/qed/qed_ptp.c:165:21: warning: 'best_period' may 
>> be used uninitialized in this function [-Wmaybe-uninitialized]
     s64 best_val, val, best_period, period, approx_dev, dif, dif2;
                        ^~~~~~~~~~~
>> drivers/net/ethernet/qlogic/qed/qed_ptp.c:165:6: warning: 'best_val' may be 
>> used uninitialized in this function [-Wmaybe-uninitialized]
     s64 best_val, val, best_period, period, approx_dev, dif, dif2;
         ^~~~~~~~

vim +/best_period +165 drivers/net/ethernet/qlogic/qed/qed_ptp.c

   149          /* Reset possibly old timestamps */
   150          qed_wr(p_hwfn, p_ptt, NIG_REG_LLH_PTP_HOST_BUF_SEQID,
   151                 QED_TIMESTAMP_MASK);
   152  
   153          return 0;
   154  }
   155  
   156  /* Adjust the HW clock by a rate given in parts-per-billion (ppb) units.
   157   * FW/HW accepts the adjustment value in terms of 3 parameters:
   158   *   Drift period - adjustment happens once in certain number of nano 
seconds.
   159   *   Drift value - time is adjusted by a certain value, for example by 
5 ns.
   160   *   Drift direction - add or subtract the adjustment value.
   161   * The routine translates ppb into the adjustment triplet in an optimal 
manner.
   162   */
   163  static int qed_ptp_hw_adjfreq(struct qed_dev *cdev, s32 ppb)
   164  {
 > 165          s64 best_val, val, best_period, period, approx_dev, dif, dif2;
   166          struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
   167          struct qed_ptt *p_ptt = p_hwfn->p_ptp_ptt;
   168          u32 drift_ctr_cfg = 0, drift_state;
   169          int drift_dir = 1;
   170  
   171          if (ppb < 0) {
   172                  ppb = -ppb;
   173                  drift_dir = 0;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to