提交 bcb87240 编写于 作者: C Colin Ian King 提交者: 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: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册