From e9edda697ed7697f1288d0656570e49c47e204ae Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Ruiz <alex@flawedcode.org> Date: Mon, 15 Oct 2007 03:37:43 +0200 Subject: 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> --- drivers/net/tg3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/tg3.c') diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 30b1cca8144..76efb3feffb 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -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; -- cgit v1.2.3-70-g09d2