Commit ecea5730 authored by Andi Drebes's avatar Andi Drebes Committed by Bartlomiej Zolnierkiewicz

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: default avatarAndi Drebes <lists-receive@programmierforen.de>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent f50f9d88
...@@ -130,7 +130,7 @@ struct hd_i_struct { ...@@ -130,7 +130,7 @@ struct hd_i_struct {
#ifdef HD_TYPE #ifdef HD_TYPE
static struct hd_i_struct hd_info[] = { 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 #else
static struct hd_i_struct hd_info[MAX_HD]; static struct hd_i_struct hd_info[MAX_HD];
static int NR_HD; static int NR_HD;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment