[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201804251247.N1yqOolr%fengguang.wu@intel.com>
Date: Wed, 25 Apr 2018 12:16:49 +0800
From: kbuild test robot <lkp@...el.com>
To: Raghuram Chary J <raghuramchary.jallipalli@...rochip.com>
Cc: kbuild-all@...org, netdev@...r.kernel.org
Subject: [net-next:master 42/70] drivers/net/usb/lan78xx.c:1651:37-38:
WARNING: Use ARRAY_SIZE
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: c749fa181bd5848be78691d23168ec61ce691b95
commit: 496218656f9857d801512efdec1d609ebbe8a83b [42/70] lan78xx: Add support to dump lan78xx registers
coccinelle warnings: (new ones prefixed by >>)
>> drivers/net/usb/lan78xx.c:1651:37-38: WARNING: Use ARRAY_SIZE
vim +1651 drivers/net/usb/lan78xx.c
1641
1642 static void
1643 lan78xx_get_regs(struct net_device *netdev, struct ethtool_regs *regs,
1644 void *buf)
1645 {
1646 u32 *data = buf;
1647 int i, j;
1648 struct lan78xx_net *dev = netdev_priv(netdev);
1649
1650 /* Read Device/MAC registers */
> 1651 for (i = 0; i < (sizeof(lan78xx_regs) / sizeof(u32)); i++)
1652 lan78xx_read_reg(dev, lan78xx_regs[i], &data[i]);
1653
1654 if (!netdev->phydev)
1655 return;
1656
1657 /* Read PHY registers */
1658 for (j = 0; j < 32; i++, j++)
1659 data[i] = phy_read(netdev->phydev, j);
1660 }
1661
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Powered by blists - more mailing lists