diff options
author | Denis Cheng <crquan@gmail.com> | 2007-09-02 06:30:18 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:51:15 -0400 |
commit | ff8ac60948ba819b89e9c87083e8050fc2f89999 (patch) | |
tree | 611975d22d7ddd8c49a073c61e6e4b7c9523fedb /drivers/net/ibm_emac | |
parent | 10d024c1b2fd58af8362670d7d6e5ae52fc33353 (diff) |
drivers/net/: all drivers/net/ cleanup with ARRAY_SIZE
Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ibm_emac')
-rw-r--r-- | drivers/net/ibm_emac/ibm_emac_debug.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ibm_emac/ibm_emac_debug.c b/drivers/net/ibm_emac/ibm_emac_debug.c index 92f970d402df..1f70906cfb98 100644 --- a/drivers/net/ibm_emac/ibm_emac_debug.c +++ b/drivers/net/ibm_emac/ibm_emac_debug.c | |||
@@ -132,7 +132,7 @@ void emac_dbg_register(int idx, struct ocp_enet_private *dev) | |||
132 | { | 132 | { |
133 | unsigned long flags; | 133 | unsigned long flags; |
134 | 134 | ||
135 | if (idx >= sizeof(__emacs) / sizeof(__emacs[0])) { | 135 | if (idx >= ARRAY_SIZE(__emacs)) { |
136 | printk(KERN_WARNING | 136 | printk(KERN_WARNING |
137 | "invalid index %d when registering EMAC for debugging\n", | 137 | "invalid index %d when registering EMAC for debugging\n", |
138 | idx); | 138 | idx); |
@@ -148,7 +148,7 @@ void mal_dbg_register(int idx, struct ibm_ocp_mal *mal) | |||
148 | { | 148 | { |
149 | unsigned long flags; | 149 | unsigned long flags; |
150 | 150 | ||
151 | if (idx >= sizeof(__mals) / sizeof(__mals[0])) { | 151 | if (idx >= ARRAY_SIZE(__mals)) { |
152 | printk(KERN_WARNING | 152 | printk(KERN_WARNING |
153 | "invalid index %d when registering MAL for debugging\n", | 153 | "invalid index %d when registering MAL for debugging\n", |
154 | idx); | 154 | idx); |
@@ -167,11 +167,11 @@ void emac_dbg_dump_all(void) | |||
167 | 167 | ||
168 | local_irq_save(flags); | 168 | local_irq_save(flags); |
169 | 169 | ||
170 | for (i = 0; i < sizeof(__mals) / sizeof(__mals[0]); ++i) | 170 | for (i = 0; i < ARRAY_SIZE(__mals); ++i) |
171 | if (__mals[i]) | 171 | if (__mals[i]) |
172 | emac_mal_dump(__mals[i]); | 172 | emac_mal_dump(__mals[i]); |
173 | 173 | ||
174 | for (i = 0; i < sizeof(__emacs) / sizeof(__emacs[0]); ++i) | 174 | for (i = 0; i < ARRAY_SIZE(__emacs); ++i) |
175 | if (__emacs[i]) | 175 | if (__emacs[i]) |
176 | emac_mac_dump(i, __emacs[i]); | 176 | emac_mac_dump(i, __emacs[i]); |
177 | 177 | ||