aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/dec/tulip/media.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-01-23 03:26:37 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-23 16:28:29 -0500
commit28f39ef6d802d2a5840582efecbf3c729b290e64 (patch)
treee97175b32d9cbb93f3b4c518b4309bcad0d2c960 /drivers/net/ethernet/dec/tulip/media.c
parent11c21a307d79ea5f6b6fc0d3dfdeda271e5e65f6 (diff)
tulip: cleanup by using ARRAY_SIZE()
In this situation then ARRAY_SIZE() and sizeof() are the same, but we're really dealing with array indexes and not byte offsets so ARRAY_SIZE() is cleaner. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/dec/tulip/media.c')
-rw-r--r--drivers/net/ethernet/dec/tulip/media.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/dec/tulip/media.c b/drivers/net/ethernet/dec/tulip/media.c
index 0d0ba725341a..dcf21a36a9cf 100644
--- a/drivers/net/ethernet/dec/tulip/media.c
+++ b/drivers/net/ethernet/dec/tulip/media.c
@@ -457,7 +457,7 @@ void tulip_find_mii(struct net_device *dev, int board_idx)
457 /* Find the connected MII xcvrs. 457 /* Find the connected MII xcvrs.
458 Doing this in open() would allow detecting external xcvrs later, 458 Doing this in open() would allow detecting external xcvrs later,
459 but takes much time. */ 459 but takes much time. */
460 for (phyn = 1; phyn <= 32 && phy_idx < sizeof (tp->phys); phyn++) { 460 for (phyn = 1; phyn <= 32 && phy_idx < ARRAY_SIZE(tp->phys); phyn++) {
461 int phy = phyn & 0x1f; 461 int phy = phyn & 0x1f;
462 int mii_status = tulip_mdio_read (dev, phy, MII_BMSR); 462 int mii_status = tulip_mdio_read (dev, phy, MII_BMSR);
463 if ((mii_status & 0x8301) == 0x8001 || 463 if ((mii_status & 0x8301) == 0x8001 ||