aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/commctrl.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@nuerscht.ch>2006-06-09 01:23:48 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-06-10 11:45:30 -0400
commit6391a11375de5e2bb1eb8481e54619761dc65d9f (patch)
tree956aae1d278a3f731b2e6148ff40a69aa7957ea8 /drivers/scsi/aacraid/commctrl.c
parent9dc399de0840a478adb71278becf598d3ab3aacc (diff)
[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>
Diffstat (limited to 'drivers/scsi/aacraid/commctrl.c')
-rw-r--r--drivers/scsi/aacraid/commctrl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c
index 9f75144e5247..255421de9d1a 100644
--- a/drivers/scsi/aacraid/commctrl.c
+++ b/drivers/scsi/aacraid/commctrl.c
@@ -535,7 +535,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
535 default: 535 default:
536 data_dir = DMA_NONE; 536 data_dir = DMA_NONE;
537 } 537 }
538 if (user_srbcmd->sg.count > (sizeof(sg_list)/sizeof(sg_list[0]))) { 538 if (user_srbcmd->sg.count > ARRAY_SIZE(sg_list)) {
539 dprintk((KERN_DEBUG"aacraid: too many sg entries %d\n", 539 dprintk((KERN_DEBUG"aacraid: too many sg entries %d\n",
540 le32_to_cpu(srbcmd->sg.count))); 540 le32_to_cpu(srbcmd->sg.count)));
541 rcode = -EINVAL; 541 rcode = -EINVAL;