From 945f390f02ce44a13aefc6d9449c99f33c9286a5 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 8 Jan 2006 01:05:11 -0800 Subject: [PATCH] drivers/block: Use ARRAY_SIZE macro Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove a duplicate of ARRAY_SIZE. Some trailing whitespaces are also removed. drivers/block/acsi* has been left out as it's marked BROKEN. Signed-off-by: Tobias Klauser Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/block/cpqarray.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/block/cpqarray.c') diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c index 9f0664dd380..862b9abac0a 100644 --- a/drivers/block/cpqarray.c +++ b/drivers/block/cpqarray.c @@ -72,11 +72,11 @@ static ctlr_info_t *hba[MAX_CTLR]; static int eisa[8]; -#define NR_PRODUCTS (sizeof(products)/sizeof(struct board_type)) +#define NR_PRODUCTS ARRAY_SIZE(products) /* board_id = Subsystem Device ID & Vendor ID * product = Marketing Name for the board - * access = Address of the struct of function pointers + * access = Address of the struct of function pointers */ static struct board_type products[] = { { 0x0040110E, "IDA", &smart1_access }, -- cgit v1.2.3-70-g09d2