[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
@@ -535,7 +535,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
|
||||
default:
|
||||
data_dir = DMA_NONE;
|
||||
}
|
||||
if (user_srbcmd->sg.count > (sizeof(sg_list)/sizeof(sg_list[0]))) {
|
||||
if (user_srbcmd->sg.count > ARRAY_SIZE(sg_list)) {
|
||||
dprintk((KERN_DEBUG"aacraid: too many sg entries %d\n",
|
||||
le32_to_cpu(srbcmd->sg.count)));
|
||||
rcode = -EINVAL;
|
||||
|
Reference in New Issue
Block a user