Skip to content

Commit

Permalink
IB/ipath: Replace open-coded ARRAY_SIZE with macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mike Marciniszyn authored and Roland Dreier committed May 8, 2012
1 parent 6475f1d commit 464357a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/infiniband/hw/ipath/ipath_iba6110.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 464357a

Please sign in to comment.