[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
@@ -132,7 +132,7 @@ static const u_char mbox_param[] = {
|
||||
PACKB(0, 0) /* 0x0042 */
|
||||
};
|
||||
|
||||
#define MAX_MBOX_COMMAND (sizeof(mbox_param)/sizeof(u_short))
|
||||
#define MAX_MBOX_COMMAND ARRAY_SIZE(mbox_param)
|
||||
|
||||
/* queue length's _must_ be power of two: */
|
||||
#define QUEUE_DEPTH(in, out, ql) ((in - out) & (ql))
|
||||
|
Reference in New Issue
Block a user