IB/ipath: Replace open-coded ARRAY_SIZE with macro
authorJim Cromie <jim.cromie@gmail.com>
Wed, 11 Apr 2012 00:55:25 +0000 (18:55 -0600)
committerRoland Dreier <roland@purestorage.com>
Tue, 8 May 2012 18:17:20 +0000 (11:17 -0700)
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/ipath/ipath_intr.c

index c0a03ac03ee7351618d9a3d72a0af29a7e58c21b..26dfbc8ee0f1cc8423b046d5ce8d2f5789a063b5 100644 (file)
@@ -209,8 +209,7 @@ void ipath_format_hwerrors(u64 hwerrs,
 {
        int i;
        const int glen =
-           sizeof(ipath_generic_hwerror_msgs) /
-           sizeof(ipath_generic_hwerror_msgs[0]);
+           ARRAY_SIZE(ipath_generic_hwerror_msgs);
 
        for (i=0; i<glen; i++) {
                if (hwerrs & ipath_generic_hwerror_msgs[i].mask) {