Commit bcb87240 authored by Colin Ian King's avatar Colin Ian King Committed by Martin K. Petersen

scsi: bfa: use ARRAY_SIZE for array sizing calculation on array __pciids

Use the ARRAY_SIZE macro on array __pciids to determine size of the
array.  Improvement suggested by coccinelle.
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 8b569180
......@@ -1957,7 +1957,7 @@ bfa_get_pciids(struct bfa_pciid_s **pciids, int *npciids)
{BFA_PCI_VENDOR_ID_BROCADE, BFA_PCI_DEVICE_ID_CT_FC},
};
*npciids = sizeof(__pciids) / sizeof(__pciids[0]);
*npciids = ARRAY_SIZE(__pciids);
*pciids = __pciids;
}
......
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