[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
@@ -1276,8 +1276,7 @@ static struct sym_chip sym_dev_table[] = {
|
||||
FE_RAM|FE_IO256|FE_LEDC}
|
||||
};
|
||||
|
||||
#define sym_num_devs \
|
||||
(sizeof(sym_dev_table) / sizeof(sym_dev_table[0]))
|
||||
#define sym_num_devs (ARRAY_SIZE(sym_dev_table))
|
||||
|
||||
/*
|
||||
* Look up the chip table.
|
||||
|
||||
Reference in New Issue
Block a user