aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/g_NCR5380.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@nuerscht.ch>2006-06-09 01:23:48 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-06-10 11:45:30 -0400
commit6391a11375de5e2bb1eb8481e54619761dc65d9f (patch)
tree956aae1d278a3f731b2e6148ff40a69aa7957ea8 /drivers/scsi/g_NCR5380.c
parent9dc399de0840a478adb71278becf598d3ab3aacc (diff)
[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 {
138[1] __initdata = { { 0,},}; 138[1] __initdata = { { 0,},};
139#endif 139#endif
140 140
141#define NO_OVERRIDES ARRAY_SIZE(overrides)
141 142
142#define NO_OVERRIDES (sizeof(overrides) / sizeof(struct override)) 143#ifndef MODULE
143
144#ifndef MODULE
145 144
146/** 145/**
147 * internal_setup - handle lilo command string override 146 * internal_setup - handle lilo command string override
@@ -210,7 +209,7 @@ static int __init do_NCR5380_setup(char *str)
210{ 209{
211 int ints[10]; 210 int ints[10];
212 211
213 get_options(str, sizeof(ints) / sizeof(int), ints); 212 get_options(str, ARRAY_SIZE(ints), ints);
214 internal_setup(BOARD_NCR5380, str, ints); 213 internal_setup(BOARD_NCR5380, str, ints);
215 return 1; 214 return 1;
216} 215}
@@ -218,7 +217,7 @@ static int __init do_NCR5380_setup(char *str)
218/** 217/**
219 * do_NCR53C400_setup - set up entry point 218 * do_NCR53C400_setup - set up entry point
220 * @str: unused 219 * @str: unused
221 * @ints: integer parameters from kernel setup code 220 * @ints: integer parameters from kernel setup code
222 * 221 *
223 * Setup function invoked at boot to parse the ncr53c400= command 222 * Setup function invoked at boot to parse the ncr53c400= command
224 * line. 223 * line.
@@ -228,7 +227,7 @@ static int __init do_NCR53C400_setup(char *str)
228{ 227{
229 int ints[10]; 228 int ints[10];
230 229
231 get_options(str, sizeof(ints) / sizeof(int), ints); 230 get_options(str, ARRAY_SIZE(ints), ints);
232 internal_setup(BOARD_NCR53C400, str, ints); 231 internal_setup(BOARD_NCR53C400, str, ints);
233 return 1; 232 return 1;
234} 233}
@@ -236,7 +235,7 @@ static int __init do_NCR53C400_setup(char *str)
236/** 235/**
237 * do_NCR53C400A_setup - set up entry point 236 * do_NCR53C400A_setup - set up entry point
238 * @str: unused 237 * @str: unused
239 * @ints: integer parameters from kernel setup code 238 * @ints: integer parameters from kernel setup code
240 * 239 *
241 * Setup function invoked at boot to parse the ncr53c400a= command 240 * Setup function invoked at boot to parse the ncr53c400a= command
242 * line. 241 * line.
@@ -246,7 +245,7 @@ static int __init do_NCR53C400A_setup(char *str)
246{ 245{
247 int ints[10]; 246 int ints[10];
248 247
249 get_options(str, sizeof(ints) / sizeof(int), ints); 248 get_options(str, ARRAY_SIZE(ints), ints);
250 internal_setup(BOARD_NCR53C400A, str, ints); 249 internal_setup(BOARD_NCR53C400A, str, ints);
251 return 1; 250 return 1;
252} 251}
@@ -254,7 +253,7 @@ static int __init do_NCR53C400A_setup(char *str)
254/** 253/**
255 * do_DTC3181E_setup - set up entry point 254 * do_DTC3181E_setup - set up entry point
256 * @str: unused 255 * @str: unused
257 * @ints: integer parameters from kernel setup code 256 * @ints: integer parameters from kernel setup code
258 * 257 *
259 * Setup function invoked at boot to parse the dtc3181e= command 258 * Setup function invoked at boot to parse the dtc3181e= command
260 * line. 259 * line.
@@ -264,7 +263,7 @@ static int __init do_DTC3181E_setup(char *str)
264{ 263{
265 int ints[10]; 264 int ints[10];
266 265
267 get_options(str, sizeof(ints) / sizeof(int), ints); 266 get_options(str, ARRAY_SIZE(ints), ints);
268 internal_setup(BOARD_DTC3181E, str, ints); 267 internal_setup(BOARD_DTC3181E, str, ints);
269 return 1; 268 return 1;
270} 269}