From 6391a11375de5e2bb1eb8481e54619761dc65d9f Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 8 Jun 2006 22:23:48 -0700 Subject: [SCSI] drivers/scsi: Use ARRAY_SIZE macro Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove duplicates of the macro. Signed-off-by: Tobias Klauser Signed-off-by: Andrew Morton Signed-off-by: James Bottomley --- drivers/scsi/dtc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'drivers/scsi/dtc.c') diff --git a/drivers/scsi/dtc.c b/drivers/scsi/dtc.c index 310d2f48866..c5108c8c887 100644 --- a/drivers/scsi/dtc.c +++ b/drivers/scsi/dtc.c @@ -145,35 +145,35 @@ static struct override { 0, IRQ_AUTO}}; #endif -#define NO_OVERRIDES (sizeof(overrides) / sizeof(struct override)) +#define NO_OVERRIDES ARRAY_SIZE(overrides) static struct base { unsigned long address; int noauto; -} bases[] __initdata = { - { 0xcc000, 0 }, - { 0xc8000, 0 }, - { 0xdc000, 0 }, +} bases[] __initdata = { + { 0xcc000, 0 }, + { 0xc8000, 0 }, + { 0xdc000, 0 }, { 0xd8000, 0 } }; -#define NO_BASES (sizeof (bases) / sizeof (struct base)) +#define NO_BASES ARRAY_SIZE(bases) static const struct signature { const char *string; int offset; -} signatures[] = { +} signatures[] = { {"DATA TECHNOLOGY CORPORATION BIOS", 0x25}, }; -#define NO_SIGNATURES (sizeof (signatures) / sizeof (struct signature)) +#define NO_SIGNATURES ARRAY_SIZE(signatures) #ifndef MODULE /* * Function : dtc_setup(char *str, int *ints) * * Purpose : LILO command line initialization of the overrides array, - * + * * Inputs : str - unused, ints - array of integer parameters with ints[0] * equal to the number of ints. * -- cgit v1.2.3