[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201905240145.yiOckIaq%lkp@intel.com>
Date: Fri, 24 May 2019 01:50:49 +0800
From: kbuild test robot <lkp@...el.com>
To: Esben Haabendal <esben@...nix.com>
Cc: kbuild-all@...org, netdev@...r.kernel.org
Subject: [net-next:master 35/39]
drivers/net/ethernet/xilinx/ll_temac_main.c:456:6: warning: 'i' may be used
uninitialized in this function
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 16fa1cf1ed2a652a483cf8f1ea65c703693292e8
commit: 1b3fa5cf859bce7094ac18d32f54af8a7148ad51 [35/39] net: ll_temac: Cleanup multicast filter on change
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 1b3fa5cf859bce7094ac18d32f54af8a7148ad51
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>
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/xilinx/ll_temac_main.c: In function 'temac_device_reset':
>> drivers/net/ethernet/xilinx/ll_temac_main.c:456:6: warning: 'i' may be used uninitialized in this function [-Wmaybe-uninitialized]
int i;
^
vim +/i +456 drivers/net/ethernet/xilinx/ll_temac_main.c
8ea7a37c5a drivers/net/ll_temac_main.c Steven J. Magnani 2010-02-17 451
9274498953 drivers/net/ll_temac_main.c Grant Likely 2009-04-25 452 static void temac_set_multicast_list(struct net_device *ndev)
9274498953 drivers/net/ll_temac_main.c Grant Likely 2009-04-25 453 {
9274498953 drivers/net/ll_temac_main.c Grant Likely 2009-04-25 454 struct temac_local *lp = netdev_priv(ndev);
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 455 u32 multi_addr_msw, multi_addr_lsw;
9274498953 drivers/net/ll_temac_main.c Grant Likely 2009-04-25 @456 int i;
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 457 unsigned long flags;
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 458 bool promisc_mode_disabled = false;
9274498953 drivers/net/ll_temac_main.c Grant Likely 2009-04-25 459
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 460 if (ndev->flags & (IFF_PROMISC | IFF_ALLMULTI) ||
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 461 (netdev_mc_count(ndev) > MULTICAST_CAM_TABLE_NUM)) {
9274498953 drivers/net/ll_temac_main.c Grant Likely 2009-04-25 462 temac_indirect_out32(lp, XTE_AFM_OFFSET, XTE_AFM_EPPRM_MASK);
9274498953 drivers/net/ll_temac_main.c Grant Likely 2009-04-25 463 dev_info(&ndev->dev, "Promiscuous mode enabled.\n");
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 464 return;
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 465 }
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 466
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 467 spin_lock_irqsave(lp->indirect_lock, flags);
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 468
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 469 if (!netdev_mc_empty(ndev)) {
22bedad3ce drivers/net/ll_temac_main.c Jiri Pirko 2010-04-01 470 struct netdev_hw_addr *ha;
9274498953 drivers/net/ll_temac_main.c Grant Likely 2009-04-25 471
f9dcbcc9e3 drivers/net/ll_temac_main.c Jiri Pirko 2010-02-23 472 i = 0;
22bedad3ce drivers/net/ll_temac_main.c Jiri Pirko 2010-04-01 473 netdev_for_each_mc_addr(ha, ndev) {
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 474 if (WARN_ON(i >= MULTICAST_CAM_TABLE_NUM))
9274498953 drivers/net/ll_temac_main.c Grant Likely 2009-04-25 475 break;
22bedad3ce drivers/net/ll_temac_main.c Jiri Pirko 2010-04-01 476 multi_addr_msw = ((ha->addr[3] << 24) |
22bedad3ce drivers/net/ll_temac_main.c Jiri Pirko 2010-04-01 477 (ha->addr[2] << 16) |
22bedad3ce drivers/net/ll_temac_main.c Jiri Pirko 2010-04-01 478 (ha->addr[1] << 8) |
22bedad3ce drivers/net/ll_temac_main.c Jiri Pirko 2010-04-01 479 (ha->addr[0]));
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 480 temac_indirect_out32_locked(lp, XTE_MAW0_OFFSET,
9274498953 drivers/net/ll_temac_main.c Grant Likely 2009-04-25 481 multi_addr_msw);
22bedad3ce drivers/net/ll_temac_main.c Jiri Pirko 2010-04-01 482 multi_addr_lsw = ((ha->addr[5] << 8) |
22bedad3ce drivers/net/ll_temac_main.c Jiri Pirko 2010-04-01 483 (ha->addr[4]) | (i << 16));
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 484 temac_indirect_out32_locked(lp, XTE_MAW1_OFFSET,
9274498953 drivers/net/ll_temac_main.c Grant Likely 2009-04-25 485 multi_addr_lsw);
f9dcbcc9e3 drivers/net/ll_temac_main.c Jiri Pirko 2010-02-23 486 i++;
9274498953 drivers/net/ll_temac_main.c Grant Likely 2009-04-25 487 }
1b3fa5cf85 drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 488 }
1b3fa5cf85 drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 489
1b3fa5cf85 drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 490 /* Clear all or remaining/unused address table entries */
1b3fa5cf85 drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 491 while (i < MULTICAST_CAM_TABLE_NUM) {
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 492 temac_indirect_out32_locked(lp, XTE_MAW0_OFFSET, 0);
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 493 temac_indirect_out32_locked(lp, XTE_MAW1_OFFSET, i << 16);
1b3fa5cf85 drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 494 i++;
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 495 }
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 496
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 497 /* Enable address filter block if currently disabled */
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 498 if (temac_indirect_in32_locked(lp, XTE_AFM_OFFSET)
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 499 & XTE_AFM_EPPRM_MASK) {
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 500 temac_indirect_out32_locked(lp, XTE_AFM_OFFSET, 0);
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 501 promisc_mode_disabled = true;
9274498953 drivers/net/ll_temac_main.c Grant Likely 2009-04-25 502 }
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 503
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 504 spin_unlock_irqrestore(lp->indirect_lock, flags);
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 505
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 506 if (promisc_mode_disabled)
1bd33bf0fe drivers/net/ethernet/xilinx/ll_temac_main.c Esben Haabendal 2019-05-23 507 dev_info(&ndev->dev, "Promiscuous mode disabled.\n");
9274498953 drivers/net/ll_temac_main.c Grant Likely 2009-04-25 508 }
9274498953 drivers/net/ll_temac_main.c Grant Likely 2009-04-25 509
:::::: The code at line 456 was first introduced by commit
:::::: 92744989533cbe85e8057935d230e128810168ce net: add Xilinx ll_temac device driver
:::::: TO: Grant Likely <grant.likely@...retlab.ca>
:::::: CC: David S. Miller <davem@...emloft.net>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (53196 bytes)
Powered by blists - more mailing lists