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: Colin Ian King <colin.king@canonical.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
8b56918082
commit
bcb872400b
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue