From e9edda697ed7697f1288d0656570e49c47e204ae Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Ruiz 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 Signed-off-by: Jeff Garzik --- drivers/net/tulip/de4x5.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/net/tulip') diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index 9b9cd83fb8b..41f34bb91ca 100644 --- a/drivers/net/tulip/de4x5.c +++ b/drivers/net/tulip/de4x5.c @@ -1041,7 +1041,7 @@ static struct InfoLeaf infoleaf_array[] = { {DC21142, dc21142_infoleaf}, {DC21143, dc21143_infoleaf} }; -#define INFOLEAF_SIZE (sizeof(infoleaf_array)/(sizeof(int)+sizeof(int *))) +#define INFOLEAF_SIZE ARRAY_SIZE(infoleaf_array) /* ** List the SROM info block functions @@ -1056,7 +1056,7 @@ static int (*dc_infoblock[])(struct net_device *dev, u_char, u_char *) = { compact_infoblock }; -#define COMPACT (sizeof(dc_infoblock)/sizeof(int *) - 1) +#define COMPACT (ARRAY_SIZE(dc_infoblock) - 1) /* ** Miscellaneous defines... -- cgit v1.2.3-70-g09d2