summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
authorJim Cromie <jim.cromie@gmail.com>2012-04-10 18:55:25 -0600
committerRoland Dreier <roland@purestorage.com>2012-05-08 11:17:20 -0700
commit6475f1df272fee35cb718acb5e55b51f23898e82 (patch)
tree5dff0f9f3c82de283571234fbc7fd7add461d126 /drivers/infiniband/hw
parentd48b97b403d23f6df0b990cee652bdf9a52337a3 (diff)
IB/ipath: Replace open-coded ARRAY_SIZE with macro
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>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_intr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_intr.c b/drivers/infiniband/hw/ipath/ipath_intr.c
index c0a03ac03ee7..26dfbc8ee0f1 100644
--- a/drivers/infiniband/hw/ipath/ipath_intr.c
+++ b/drivers/infiniband/hw/ipath/ipath_intr.c
@@ -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) {