[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
@@ -1701,7 +1701,7 @@ wd33c93_abort(struct scsi_cmnd * cmd)
|
||||
}
|
||||
|
||||
#define MAX_WD33C93_HOSTS 4
|
||||
#define MAX_SETUP_ARGS ((int)(sizeof(setup_args) / sizeof(char *)))
|
||||
#define MAX_SETUP_ARGS ARRAY_SIZE(setup_args)
|
||||
#define SETUP_BUFFER_SIZE 200
|
||||
static char setup_buffer[SETUP_BUFFER_SIZE];
|
||||
static char setup_used[MAX_SETUP_ARGS];
|
||||
|
Reference in New Issue
Block a user