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

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>

authored by

Robert P. J. Day and committed by
Roland Dreier
fd91b1bf 9670e553

+2 -2
+2 -2
drivers/infiniband/hw/ipath/ipath_iba7220.c
··· 2228 2228 0xffffffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 2229 2229 0x40000001, 0x1388, 0x15e, /* rest 0's */ 2230 2230 }; 2231 - dcnt = sizeof(madpayload_start)/sizeof(madpayload_start[0]); 2232 - hcnt = sizeof(hdr)/sizeof(hdr[0]); 2231 + dcnt = ARRAY_SIZE(madpayload_start); 2232 + hcnt = ARRAY_SIZE(hdr); 2233 2233 if (!swapped) { 2234 2234 /* for maintainability, do it at runtime */ 2235 2235 for (i = 0; i < hcnt; i++) {