Skip to content

Commit

Permalink
e1000: Use ARRAY_SIZE macro when appropriate
Browse files Browse the repository at this point in the history
A patch to use ARRAY_SIZE macro already defined in kernel.h.

Signed-off-by: Ahmed S. Darwish <[email protected]>
Signed-off-by: Auke Kok <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
  • Loading branch information
a-darwish authored and Jeff Garzik committed Apr 28, 2007
1 parent 024a0a3 commit c38db30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/e1000/e1000_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ e1000_set_ringparam(struct net_device *netdev,
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)) { \
Expand Down

0 comments on commit c38db30

Please sign in to comment.