#elif defined(CONFIG_MX25) || defined(CONFIG_MX35)
 static int is_16bit_nand(void)
 {
-       struct ccm_regs *ccm =
-               (struct ccm_regs *)IMX_CCM_BASE;
+       struct ccm_regs *ccm = (struct ccm_regs *)IMX_CCM_BASE;
 
        if (readl(&ccm->rcsr) & CCM_RCSR_NF_16BIT_SEL)
                return 1;
                if (spare_only)
                        config1 |= NFC_SP_EN;
                else
-                       config1 &= ~(NFC_SP_EN);
+                       config1 &= ~NFC_SP_EN;
                writew(config1, &host->regs->config1);
        }
 
 #define mxc_nand_write_page_syndrome NULL
 #define mxc_nand_write_page_raw_syndrome NULL
 #define mxc_nand_write_oob_syndrome NULL
-#define mxc_nfc_11_nand_correct_data NULL
 
 static int mxc_nand_correct_data(struct mtd_info *mtd, u_char *dat,
                                 u_char *read_ecc, u_char *calc_ecc)
 {
        struct mtd_info *mtd;
        uint16_t tmp;
-       int err = 0;
 
 #ifdef CONFIG_SYS_NAND_USE_FLASH_BBT
        this->options |= NAND_USE_FLASH_BBT;
        this->ecc.layout = &nand_hw_eccoob;
 #endif
        mxc_setup_config1();
-       return err;
+       return 0;
 }
 
        writew(tmp, &nfc->config2);
 }
 
-void nfc_nand_init(void)
+static void nfc_nand_init(void)
 {
 #if defined(MXC_NFC_V1_1)
-       int ecc_per_page  = CONFIG_SYS_NAND_PAGE_SIZE / 512;
+       int ecc_per_page = CONFIG_SYS_NAND_PAGE_SIZE / 512;
        int config1;
 
        writew(CONFIG_SYS_NAND_SPARE_SIZE / 2, &nfc->spare_area_size);
        writew(0x2, &nfc->config);
 
        /* hardware ECC checking and correct */
-       config1 = readw(&nfc->config1) | NFC_ECC_EN | 0x800;
+       config1 = readw(&nfc->config1) | NFC_ECC_EN | NFC_FP_INT;
        /*
         * if spare size is larger that 16 bytes per 512 byte hunk
         * then use 8 symbol correction instead of 4
         */
-       if ((CONFIG_SYS_NAND_SPARE_SIZE / ecc_per_page) > 16)
+       if (CONFIG_SYS_NAND_SPARE_SIZE / ecc_per_page > 16)
                config1 &= ~NFC_4_8N_ECC;
        else
                config1 |= NFC_4_8N_ECC;
         * This NAND controller requires multiple input commands
         * for pages larger than 512 bytes.
         */
-       for (i = 1; i < (CONFIG_SYS_NAND_PAGE_SIZE / 512); i++) {
+       for (i = 1; i < CONFIG_SYS_NAND_PAGE_SIZE / 512; i++) {
                config1 = readw(&nfc->config1);
                config1 |= NFC_ECC_EN | NFC_INT_MSK;
                writew(config1, &nfc->config1);
        dst = (u32 *)buf;
 
        /* main copy loop from NAND-buffer to SDRAM memory */
-       for (i = 0; i < (CONFIG_SYS_NAND_PAGE_SIZE / 4); i++) {
+       for (i = 0; i < CONFIG_SYS_NAND_PAGE_SIZE / 4; i++) {
                writel(readl(src), dst);
                src++;
                dst++;
        page = from / CONFIG_SYS_NAND_PAGE_SIZE;
        i = 0;
 
-       while (i < (size / CONFIG_SYS_NAND_PAGE_SIZE)) {
+       while (i < size / CONFIG_SYS_NAND_PAGE_SIZE) {
                if (nfc_read_page(page, buf) < 0)
                        return -1;