Commit fd91b1bf authored by Robert P. J. Day's avatar Robert P. J. Day Committed by Roland Dreier

IB/ipath: Simplify code using ARRAY_SIZE() macro

Signed-off-by: default avatarRobert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 9670e553
...@@ -2228,8 +2228,8 @@ static void ipath_autoneg_send(struct ipath_devdata *dd, int which) ...@@ -2228,8 +2228,8 @@ static void ipath_autoneg_send(struct ipath_devdata *dd, int which)
0xffffffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffffffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x40000001, 0x1388, 0x15e, /* rest 0's */ 0x40000001, 0x1388, 0x15e, /* rest 0's */
}; };
dcnt = sizeof(madpayload_start)/sizeof(madpayload_start[0]); dcnt = ARRAY_SIZE(madpayload_start);
hcnt = sizeof(hdr)/sizeof(hdr[0]); hcnt = ARRAY_SIZE(hdr);
if (!swapped) { if (!swapped) {
/* for maintainability, do it at runtime */ /* for maintainability, do it at runtime */
for (i = 0; i < hcnt; i++) { for (i = 0; i < hcnt; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment