Use macro definition
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Acked-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
        bfa->fcs = BFA_TRUE;
        fcbuild_init();
 
-       for (i = 0; i < sizeof(fcs_modules) / sizeof(fcs_modules[0]); i++) {
+       for (i = 0; i < ARRAY_SIZE(fcs_modules); i++) {
                mod = &fcs_modules[i];
                if (mod->attach)
                        mod->attach(fcs);
        int     i;
        struct bfa_fcs_mod_s  *mod;
 
-       for (i = 0; i < sizeof(fcs_modules) / sizeof(fcs_modules[0]); i++) {
+       for (i = 0; i < ARRAY_SIZE(fcs_modules); i++) {
                mod = &fcs_modules[i];
                if (mod->modinit)
                        mod->modinit(fcs);
 
        bfa_wc_init(&fcs->wc, bfa_fcs_exit_comp, fcs);
 
-       nmods = sizeof(fcs_modules) / sizeof(fcs_modules[0]);
+       nmods = ARRAY_SIZE(fcs_modules);
 
        for (i = 0; i < nmods; i++) {