OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b56918
)
scsi: bfa: use ARRAY_SIZE for array sizing calculation on array __pciids
author
Colin Ian King
<colin.king@canonical.com>
Sun, 7 Jan 2018 23:15:10 +0000
(23:15 +0000)
committer
Martin K. Petersen
<martin.petersen@oracle.com>
Thu, 11 Jan 2018 04:25:10 +0000
(23:25 -0500)
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>
drivers/scsi/bfa/bfa_core.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/bfa/bfa_core.c
b/drivers/scsi/bfa/bfa_core.c
index
3e1caec
..
10a63be
100644
(file)
--- 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;
}