Commit:     ecea57309e826c8aed020e4dae92b368f2eda2a5
Parent:     f50f9d8867b95925078ba0fa450e3a5736629d28
Author:     Andi Drebes <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 9 23:17:57 2007 +0200
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Mon Jul 9 23:17:57 2007 +0200

    drivers/ide/legacy/hd.c: Array size calculation using sizeof replaced with 
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
 drivers/ide/legacy/hd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ide/legacy/hd.c b/drivers/ide/legacy/hd.c
index 45ed035..661c12f 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);
 static struct hd_i_struct hd_info[MAX_HD];
 static int NR_HD;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to