netdev: convert non-obvious instances to use ARRAY_SIZE()

This will convert remaining non-obvious or naive calculations of array
sizes to use ARRAY_SIZE() macro.

Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
Alejandro Martinez Ruiz
2007-10-15 03:37:43 +02:00
committed by Jeff Garzik
parent 88a15f2e28
commit e9edda697e
6 changed files with 11 additions and 11 deletions

View File

@@ -9034,7 +9034,7 @@ static int tg3_do_mem_test(struct tg3 *tp, u32 offset, u32 len)
int i;
u32 j;
for (i = 0; i < sizeof(test_pattern)/sizeof(u32); i++) {
for (i = 0; i < ARRAY_SIZE(test_pattern); i++) {
for (j = 0; j < len; j += 4) {
u32 val;