Hi Salil,

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

url:    
https://github.com/0day-ci/linux/commits/Salil-Mehta/net-hns-Fix-to-conditionally-convey-RX-checksum-flag-to-stack/20161206-022948
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/hisilicon/hns/hns_enet.c: In function 
'hns_nic_rx_poll_one':
>> drivers/net/ethernet/hisilicon/hns/hns_enet.c:606:5: warning: 'l3id' may be 
>> used uninitialized in this function [-Wmaybe-uninitialized]
     if ((l3id != HNS_RX_FLAG_L3ID_IPV4) && (l3id != HNS_RX_FLAG_L3ID_IPV6))
        ^
   drivers/net/ethernet/hisilicon/hns/hns_enet.c:573:6: note: 'l3id' was 
declared here
     u32 l3id;
         ^~~~
>> drivers/net/ethernet/hisilicon/hns/hns_enet.c:618:37: warning: 'l4id' may be 
>> used uninitialized in this function [-Wmaybe-uninitialized]
     if ((l4id != HNS_RX_FLAG_L4ID_TCP) &&
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
         (l4id != HNS_RX_FLAG_L4ID_UDP) &&
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
   drivers/net/ethernet/hisilicon/hns/hns_enet.c:574:6: note: 'l4id' was 
declared here
     u32 l4id;
         ^~~~

vim +/l3id +606 drivers/net/ethernet/hisilicon/hns/hns_enet.c

   600           * checksum or any other L3/L4 error, we will not (cannot) 
convey
   601           * checksum status for such cases to upper stack and will not 
maintain
   602           * the RX L3/L4 checksum counters as well.
   603           */
   604  
   605          /*  check L3 protocol for which checksum is supported */
 > 606          if ((l3id != HNS_RX_FLAG_L3ID_IPV4) && (l3id != 
 > HNS_RX_FLAG_L3ID_IPV6))
   607                  return;
   608  
   609          /* check for any(not just checksum)flagged L3 protocol errors */
   610          if (unlikely(hnae_get_bit(flag, HNS_RXD_L3E_B)))
   611                  return;
   612  
   613          /* we do not support checksum of fragmented packets */
   614          if (unlikely(hnae_get_bit(flag, HNS_RXD_FRAG_B)))
   615                  return;
   616  
   617          /*  check L4 protocol for which checksum is supported */
 > 618          if ((l4id != HNS_RX_FLAG_L4ID_TCP) &&
   619              (l4id != HNS_RX_FLAG_L4ID_UDP) &&
   620              (l4id != HNS_RX_FLAG_L4ID_SCTP))
   621                  return;

---
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