summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/g_NCR5380.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@nuerscht.ch>2006-06-08 22:23:48 -0700
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-06-10 10:45:30 -0500
commit6391a11375de5e2bb1eb8481e54619761dc65d9f (patch)
tree956aae1d278a3f731b2e6148ff40a69aa7957ea8 /drivers/scsi/g_NCR5380.c
parent9dc399de0840a478adb71278becf598d3ab3aacc (diff)
downloadblackbird-op-linux-6391a11375de5e2bb1eb8481e54619761dc65d9f.tar.gz
blackbird-op-linux-6391a11375de5e2bb1eb8481e54619761dc65d9f.zip
[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/g_NCR5380.c')
-rw-r--r--drivers/scsi/g_NCR5380.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
index e6bcfe949340..5f313c93b7a9 100644
--- a/drivers/scsi/g_NCR5380.c
+++ b/drivers/scsi/g_NCR5380.c
@@ -138,10 +138,9 @@ static struct override {
[1] __initdata = { { 0,},};
#endif
+#define NO_OVERRIDES ARRAY_SIZE(overrides)
-#define NO_OVERRIDES (sizeof(overrides) / sizeof(struct override))
-
-#ifndef MODULE
+#ifndef MODULE
/**
* internal_setup - handle lilo command string override
@@ -210,7 +209,7 @@ static int __init do_NCR5380_setup(char *str)
{
int ints[10];
- get_options(str, sizeof(ints) / sizeof(int), ints);
+ get_options(str, ARRAY_SIZE(ints), ints);
internal_setup(BOARD_NCR5380, str, ints);
return 1;
}
@@ -218,7 +217,7 @@ static int __init do_NCR5380_setup(char *str)
/**
* do_NCR53C400_setup - set up entry point
* @str: unused
- * @ints: integer parameters from kernel setup code
+ * @ints: integer parameters from kernel setup code
*
* Setup function invoked at boot to parse the ncr53c400= command
* line.
@@ -228,7 +227,7 @@ static int __init do_NCR53C400_setup(char *str)
{
int ints[10];
- get_options(str, sizeof(ints) / sizeof(int), ints);
+ get_options(str, ARRAY_SIZE(ints), ints);
internal_setup(BOARD_NCR53C400, str, ints);
return 1;
}
@@ -236,7 +235,7 @@ static int __init do_NCR53C400_setup(char *str)
/**
* do_NCR53C400A_setup - set up entry point
* @str: unused
- * @ints: integer parameters from kernel setup code
+ * @ints: integer parameters from kernel setup code
*
* Setup function invoked at boot to parse the ncr53c400a= command
* line.
@@ -246,7 +245,7 @@ static int __init do_NCR53C400A_setup(char *str)
{
int ints[10];
- get_options(str, sizeof(ints) / sizeof(int), ints);
+ get_options(str, ARRAY_SIZE(ints), ints);
internal_setup(BOARD_NCR53C400A, str, ints);
return 1;
}
@@ -254,7 +253,7 @@ static int __init do_NCR53C400A_setup(char *str)
/**
* do_DTC3181E_setup - set up entry point
* @str: unused
- * @ints: integer parameters from kernel setup code
+ * @ints: integer parameters from kernel setup code
*
* Setup function invoked at boot to parse the dtc3181e= command
* line.
@@ -264,7 +263,7 @@ static int __init do_DTC3181E_setup(char *str)
{
int ints[10];
- get_options(str, sizeof(ints) / sizeof(int), ints);
+ get_options(str, ARRAY_SIZE(ints), ints);
internal_setup(BOARD_DTC3181E, str, ints);
return 1;
}
OpenPOWER on IntegriCloud