diff options
author | Tobias Klauser <tklauser@nuerscht.ch> | 2006-06-09 01:23:48 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-06-10 11:45:30 -0400 |
commit | 6391a11375de5e2bb1eb8481e54619761dc65d9f (patch) | |
tree | 956aae1d278a3f731b2e6148ff40a69aa7957ea8 /drivers/scsi/fdomain.c | |
parent | 9dc399de0840a478adb71278becf598d3ab3aacc (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/fdomain.c')
-rw-r--r-- | drivers/scsi/fdomain.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c index 7334244397d1..e16013f0ad6e 100644 --- a/drivers/scsi/fdomain.c +++ b/drivers/scsi/fdomain.c | |||
@@ -420,10 +420,10 @@ static unsigned long addresses[] = { | |||
420 | 0xd0000, | 420 | 0xd0000, |
421 | 0xe0000, | 421 | 0xe0000, |
422 | }; | 422 | }; |
423 | #define ADDRESS_COUNT (sizeof( addresses ) / sizeof( unsigned )) | 423 | #define ADDRESS_COUNT ARRAY_SIZE(addresses) |
424 | 424 | ||
425 | static unsigned short ports[] = { 0x140, 0x150, 0x160, 0x170 }; | 425 | static unsigned short ports[] = { 0x140, 0x150, 0x160, 0x170 }; |
426 | #define PORT_COUNT (sizeof( ports ) / sizeof( unsigned short )) | 426 | #define PORT_COUNT ARRAY_SIZE(ports) |
427 | 427 | ||
428 | static unsigned short ints[] = { 3, 5, 10, 11, 12, 14, 15, 0 }; | 428 | static unsigned short ints[] = { 3, 5, 10, 11, 12, 14, 15, 0 }; |
429 | 429 | ||
@@ -502,7 +502,7 @@ static struct signature { | |||
502 | geometry location are verified). */ | 502 | geometry location are verified). */ |
503 | }; | 503 | }; |
504 | 504 | ||
505 | #define SIGNATURE_COUNT (sizeof( signatures ) / sizeof( struct signature )) | 505 | #define SIGNATURE_COUNT ARRAY_SIZE(signatures) |
506 | 506 | ||
507 | static void print_banner( struct Scsi_Host *shpnt ) | 507 | static void print_banner( struct Scsi_Host *shpnt ) |
508 | { | 508 | { |
@@ -519,7 +519,7 @@ static void print_banner( struct Scsi_Host *shpnt ) | |||
519 | 519 | ||
520 | if (bios_minor >= 0) printk("%d", bios_minor); | 520 | if (bios_minor >= 0) printk("%d", bios_minor); |
521 | else printk("?."); | 521 | else printk("?."); |
522 | 522 | ||
523 | printk( " at 0x%lx using scsi id %d\n", | 523 | printk( " at 0x%lx using scsi id %d\n", |
524 | bios_base, shpnt->this_id ); | 524 | bios_base, shpnt->this_id ); |
525 | } | 525 | } |