summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-01-08 00:15:10 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2018-01-11 05:25:10 +0100
commitbcb872400b50e0cfa75f12e6d6097595cd317690 (patch)
treeb1a9550acf02191fefa78e3572cde69238d6bebf /drivers/scsi/bfa
parentscsi: qla2xxx: remove redundant assignment of d (diff)
downloadlinux-bcb872400b50e0cfa75f12e6d6097595cd317690.tar.xz
linux-bcb872400b50e0cfa75f12e6d6097595cd317690.zip
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>
Diffstat (limited to 'drivers/scsi/bfa')
-rw-r--r--drivers/scsi/bfa/bfa_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/bfa/bfa_core.c b/drivers/scsi/bfa/bfa_core.c
index 3e1caec82554..10a63be92544 100644
--- a/drivers/scsi/bfa/bfa_core.c
+++ b/drivers/scsi/bfa/bfa_core.c
@@ -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;
}