Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

IB/ipath: Replace open-coded ARRAY_SIZE with macro

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>

authored by

Mike Marciniszyn and committed by
Roland Dreier
464357a7 6475f1df

+1 -2
+1 -2
drivers/infiniband/hw/ipath/ipath_iba6110.c
··· 596 596 597 597 ipath_format_hwerrors(hwerrs, 598 598 ipath_6110_hwerror_msgs, 599 - sizeof(ipath_6110_hwerror_msgs) / 600 - sizeof(ipath_6110_hwerror_msgs[0]), 599 + ARRAY_SIZE(ipath_6110_hwerror_msgs), 601 600 msg, msgl); 602 601 603 602 if (hwerrs & (_IPATH_HTLINK0_CRCBITS | _IPATH_HTLINK1_CRCBITS))