summaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000
diff options
context:
space:
mode:
authorAhmed S. Darwish <darwish.07@gmail.com>2007-03-06 17:58:02 +0100
committerJeff Garzik <jeff@garzik.org>2007-04-28 17:00:57 +0200
commitc38db30b22913394f4634dc09f32d7838eb52ca1 (patch)
tree11d6fbb7271f9afdca01f51b5b84482acb9e7749 /drivers/net/e1000
parentnetwork: add the missing phy_device speed information to phy_mii_ioctl (diff)
downloadlinux-c38db30b22913394f4634dc09f32d7838eb52ca1.tar.xz
linux-c38db30b22913394f4634dc09f32d7838eb52ca1.zip
e1000: Use ARRAY_SIZE macro when appropriate
A patch to use ARRAY_SIZE macro already defined in kernel.h. Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r--drivers/net/e1000/e1000_ethtool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index 6777887295f5..a094288f0277 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -742,7 +742,7 @@ err_setup:
uint32_t pat, value; \
uint32_t test[] = \
{0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF}; \
- for (pat = 0; pat < sizeof(test)/sizeof(test[0]); pat++) { \
+ for (pat = 0; pat < ARRAY_SIZE(test); pat++) { \
E1000_WRITE_REG(&adapter->hw, R, (test[pat] & W)); \
value = E1000_READ_REG(&adapter->hw, R); \
if (value != (test[pat] & W & M)) { \