aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sg.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/sg.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/sg.c')
-rw-r--r--drivers/scsi/sg.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index b098942445ec..98b9312ba8da 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -2635,8 +2635,7 @@ static int
2635sg_proc_init(void) 2635sg_proc_init(void)
2636{ 2636{
2637 int k, mask; 2637 int k, mask;
2638 int num_leaves = 2638 int num_leaves = ARRAY_SIZE(sg_proc_leaf_arr);
2639 sizeof (sg_proc_leaf_arr) / sizeof (sg_proc_leaf_arr[0]);
2640 struct proc_dir_entry *pdep; 2639 struct proc_dir_entry *pdep;
2641 struct sg_proc_leaf * leaf; 2640 struct sg_proc_leaf * leaf;
2642 2641
@@ -2661,8 +2660,7 @@ static void
2661sg_proc_cleanup(void) 2660sg_proc_cleanup(void)
2662{ 2661{
2663 int k; 2662 int k;
2664 int num_leaves = 2663 int num_leaves = ARRAY_SIZE(sg_proc_leaf_arr);
2665 sizeof (sg_proc_leaf_arr) / sizeof (sg_proc_leaf_arr[0]);
2666 2664
2667 if (!sg_proc_sgp) 2665 if (!sg_proc_sgp)
2668 return; 2666 return;