staging: wilc1000: remove unnecessary assingment from 'if' conditions
authorAjay Singh <ajay.kathat@microchip.com>
Wed, 25 Apr 2018 17:18:08 +0000 (22:48 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Apr 2018 07:43:04 +0000 (09:43 +0200)
Cleanup patch to remove the unnecessary use of '==' check used in if
conditions.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_sdio.c
drivers/staging/wilc1000/wilc_spi.c

index 087ad42d7a01e1dc69b36ec0a9e932d5223e8e27..54121c3280cb751839ec92359d6b139a2529196a 100644 (file)
@@ -885,13 +885,13 @@ static int sdio_clear_int_ext(struct wilc *wilc, u32 val)
                        reg = 0;
                }
                /* select VMM table 0 */
-               if ((val & SEL_VMM_TBL0) == SEL_VMM_TBL0)
+               if (val & SEL_VMM_TBL0)
                        reg |= BIT(5);
                /* select VMM table 1 */
-               if ((val & SEL_VMM_TBL1) == SEL_VMM_TBL1)
+               if (val & SEL_VMM_TBL1)
                        reg |= BIT(6);
                /* enable VMM */
-               if ((val & EN_VMM) == EN_VMM)
+               if (val & EN_VMM)
                        reg |= BIT(7);
                if (reg) {
                        struct sdio_cmd52 cmd;
@@ -961,13 +961,13 @@ static int sdio_clear_int_ext(struct wilc *wilc, u32 val)
 
        vmm_ctl = 0;
        /* select VMM table 0 */
-       if ((val & SEL_VMM_TBL0) == SEL_VMM_TBL0)
+       if (val & SEL_VMM_TBL0)
                vmm_ctl |= BIT(0);
        /* select VMM table 1 */
-       if ((val & SEL_VMM_TBL1) == SEL_VMM_TBL1)
+       if (val & SEL_VMM_TBL1)
                vmm_ctl |= BIT(1);
        /* enable VMM */
-       if ((val & EN_VMM) == EN_VMM)
+       if (val & EN_VMM)
                vmm_ctl |= BIT(2);
 
        if (vmm_ctl) {
index b7fb08fffea0623f20d204b93c7794056a3e608f..417d6b6b5fea4a6e4f5a63008052a239734c58fe 100644 (file)
@@ -1026,10 +1026,10 @@ static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val)
 
        tbl_ctl = 0;
        /* select VMM table 0 */
-       if ((val & SEL_VMM_TBL0) == SEL_VMM_TBL0)
+       if (val & SEL_VMM_TBL0)
                tbl_ctl |= BIT(0);
        /* select VMM table 1 */
-       if ((val & SEL_VMM_TBL1) == SEL_VMM_TBL1)
+       if (val & SEL_VMM_TBL1)
                tbl_ctl |= BIT(1);
 
        ret = wilc_spi_write_reg(wilc, WILC_VMM_TBL_CTL, tbl_ctl);
@@ -1038,7 +1038,7 @@ static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val)
                return ret;
        }
 
-       if ((val & EN_VMM) == EN_VMM) {
+       if (val & EN_VMM) {
                /*
                 * enable vmm transfer.
                 */