From ecea57309e826c8aed020e4dae92b368f2eda2a5 Mon Sep 17 00:00:00 2001 From: Andi Drebes Date: Mon, 9 Jul 2007 23:17:57 +0200 Subject: drivers/ide/legacy/hd.c: Array size calculation using sizeof replaced with ARRAY_SIZE This patch replaces an array size calculation in drivers/ide/legacy/hd.c that was done using sizeof with the ARRAY_SIZE macro. Tested by compilation on an i386 box using "allyesconfig". Diffed against Linus' git-tree. Signed-off-by: Andi Drebes Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/legacy/hd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ide/legacy/hd.c b/drivers/ide/legacy/hd.c index 45ed03591cd..661c12f6dda 100644 --- a/drivers/ide/legacy/hd.c +++ b/drivers/ide/legacy/hd.c @@ -130,7 +130,7 @@ struct hd_i_struct { #ifdef HD_TYPE static struct hd_i_struct hd_info[] = { HD_TYPE }; -static int NR_HD = ((sizeof (hd_info))/(sizeof (struct hd_i_struct))); +static int NR_HD = ARRAY_SIZE(hd_info); #else static struct hd_i_struct hd_info[MAX_HD]; static int NR_HD; -- cgit v1.2.3-18-g5258