mmc: core: drop unnecessary bit checking
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 15 Apr 2016 11:16:12 +0000 (20:16 +0900)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 2 May 2016 08:33:31 +0000 (10:33 +0200)
This if-block is going to call mmc_card_set_blockaddr(), so
mmc_card_blockaddr() right before it is redundant.

I am fixing the block comment style while I am here.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/mmc.c

index b8aa12ced45f94d850d20af56e788b6cb3028e43..28b477d397b1be342689a51929983b84e0d96022 100644 (file)
@@ -1483,12 +1483,13 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
                if (err)
                        goto free_card;
 
-               /* If doing byte addressing, check if required to do sector
+               /*
+                * If doing byte addressing, check if required to do sector
                 * addressing.  Handle the case of <2GB cards needing sector
                 * addressing.  See section 8.1 JEDEC Standard JED84-A441;
                 * ocr register has bit 30 set for sector addressing.
                 */
-               if (!(mmc_card_blockaddr(card)) && (rocr & (1<<30)))
+               if (rocr & BIT(30))
                        mmc_card_set_blockaddr(card);
 
                /* Erase size depends on CSD and Extended CSD */