2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 12:14:01 +08:00

IB/ipath: Simplify code using ARRAY_SIZE() macro

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
Robert P. J. Day 2008-07-14 23:48:44 -07:00 committed by Roland Dreier
parent 9670e55391
commit fd91b1bf1b

View File

@ -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++) {