[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>
This commit is contained in:
committed by
James Bottomley
parent
9dc399de08
commit
6391a11375
+9
-9
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user