diff options
author | Tobias Klauser <tklauser@nuerscht.ch> | 2006-06-08 22:23:48 -0700 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-06-10 10:45:30 -0500 |
commit | 6391a11375de5e2bb1eb8481e54619761dc65d9f (patch) | |
tree | 956aae1d278a3f731b2e6148ff40a69aa7957ea8 /drivers/scsi/dtc.c | |
parent | 9dc399de0840a478adb71278becf598d3ab3aacc (diff) | |
download | kernel_samsung_smdk4412-6391a11375de5e2bb1eb8481e54619761dc65d9f.zip kernel_samsung_smdk4412-6391a11375de5e2bb1eb8481e54619761dc65d9f.tar.gz kernel_samsung_smdk4412-6391a11375de5e2bb1eb8481e54619761dc65d9f.tar.bz2 |
[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 <tklauser@nuerscht.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/dtc.c')
-rw-r--r-- | drivers/scsi/dtc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/scsi/dtc.c b/drivers/scsi/dtc.c index 310d2f4..c5108c8 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. * |