IB/ipath: Replace open-coded ARRAY_SIZE with macro
authorMike Marciniszyn <mike.marciniszyn@qlogic.com>
Thu, 19 Apr 2012 15:59:15 +0000 (11:59 -0400)
committerRoland Dreier <roland@purestorage.com>
Tue, 8 May 2012 18:17:20 +0000 (11:17 -0700)
Change sizeof(array)/sizeof(array[0]) to ARRAY_SIZE.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/ipath/ipath_iba6110.c

index 1d7aea132a0933c9cfead1cd08fa1b7677920c94..7cc305488a3d6bf0868692bf7d8ec268a74cdcd1 100644 (file)
@@ -596,8 +596,7 @@ static void ipath_ht_handle_hwerrors(struct ipath_devdata *dd, char *msg,
 
        ipath_format_hwerrors(hwerrs,
                              ipath_6110_hwerror_msgs,
-                             sizeof(ipath_6110_hwerror_msgs) /
-                             sizeof(ipath_6110_hwerror_msgs[0]),
+                             ARRAY_SIZE(ipath_6110_hwerror_msgs),
                              msg, msgl);
 
        if (hwerrs & (_IPATH_HTLINK0_CRCBITS | _IPATH_HTLINK1_CRCBITS))