aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfa_fcs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/bfa/bfa_fcs.c')
-rw-r--r--drivers/scsi/bfa/bfa_fcs.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/scsi/bfa/bfa_fcs.c b/drivers/scsi/bfa/bfa_fcs.c
index 3ec2f49de61d..d1a99209bf5f 100644
--- a/drivers/scsi/bfa/bfa_fcs.c
+++ b/drivers/scsi/bfa/bfa_fcs.c
@@ -86,7 +86,7 @@ bfa_fcs_attach(struct bfa_fcs_s *fcs, struct bfa_s *bfa, struct bfad_s *bfad,
86 bfa_attach_fcs(bfa); 86 bfa_attach_fcs(bfa);
87 fcbuild_init(); 87 fcbuild_init();
88 88
89 for (i = 0; i < sizeof(fcs_modules) / sizeof(fcs_modules[0]); i++) { 89 for (i = 0; i < ARRAY_SIZE(fcs_modules); i++) {
90 mod = &fcs_modules[i]; 90 mod = &fcs_modules[i];
91 if (mod->attach) 91 if (mod->attach)
92 mod->attach(fcs); 92 mod->attach(fcs);
@@ -103,7 +103,7 @@ bfa_fcs_init(struct bfa_fcs_s *fcs)
103 struct bfa_fcs_mod_s *mod; 103 struct bfa_fcs_mod_s *mod;
104 struct bfi_pbc_vport_s pbc_vports[BFI_PBC_MAX_VPORTS]; 104 struct bfi_pbc_vport_s pbc_vports[BFI_PBC_MAX_VPORTS];
105 105
106 for (i = 0; i < sizeof(fcs_modules) / sizeof(fcs_modules[0]); i++) { 106 for (i = 0; i < ARRAY_SIZE(fcs_modules); i++) {
107 mod = &fcs_modules[i]; 107 mod = &fcs_modules[i];
108 if (mod->modinit) 108 if (mod->modinit)
109 mod->modinit(fcs); 109 mod->modinit(fcs);
@@ -171,13 +171,11 @@ void
171bfa_fcs_exit(struct bfa_fcs_s *fcs) 171bfa_fcs_exit(struct bfa_fcs_s *fcs)
172{ 172{
173 struct bfa_fcs_mod_s *mod; 173 struct bfa_fcs_mod_s *mod;
174 int nmods, i; 174 int i;
175 175
176 bfa_wc_init(&fcs->wc, bfa_fcs_exit_comp, fcs); 176 bfa_wc_init(&fcs->wc, bfa_fcs_exit_comp, fcs);
177 177
178 nmods = sizeof(fcs_modules) / sizeof(fcs_modules[0]); 178 for (i = 0; i < ARRAY_SIZE(fcs_modules); i++) {
179
180 for (i = 0; i < nmods; i++) {
181 179
182 mod = &fcs_modules[i]; 180 mod = &fcs_modules[i];
183 if (mod->modexit) { 181 if (mod->modexit) {