Skip to content

Commit

Permalink
IB/ipath: Simplify code using ARRAY_SIZE() macro
Browse files Browse the repository at this point in the history
Signed-off-by: Robert P. J. Day <[email protected]>
Signed-off-by: Roland Dreier <[email protected]>
  • Loading branch information
rpjday authored and Roland Dreier committed Jul 15, 2008
1 parent 9670e55 commit fd91b1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/infiniband/hw/ipath/ipath_iba7220.c
Original file line number Diff line number Diff line change
Expand Up @@ -2228,8 +2228,8 @@ static void ipath_autoneg_send(struct ipath_devdata *dd, int which)
0xffffffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x40000001, 0x1388, 0x15e, /* rest 0's */
};
dcnt = sizeof(madpayload_start)/sizeof(madpayload_start[0]);
hcnt = sizeof(hdr)/sizeof(hdr[0]);
dcnt = ARRAY_SIZE(madpayload_start);
hcnt = ARRAY_SIZE(hdr);
if (!swapped) {
/* for maintainability, do it at runtime */
for (i = 0; i < hcnt; i++) {
Expand Down

0 comments on commit fd91b1b

Please sign in to comment.