Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1379738 > unrolled thread
| Started by | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| First post | 2016-04-15 13:20 +0200 |
| Last post | 2016-04-18 13:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] mmc: drop unnecessary bit checking Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-04-15 13:20 +0200
Re: [PATCH] mmc: drop unnecessary bit checking Ulf Hansson <ulf.hansson@linaro.org> - 2016-04-18 13:30 +0200
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Date | 2016-04-15 13:20 +0200 |
| Subject | [PATCH] mmc: drop unnecessary bit checking |
| Message-ID | <ro9X3-25i-9@gated-at.bofh.it> |
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> --- drivers/mmc/core/mmc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 4dbe3df..c96bc81 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -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 */ -- 1.9.1
[toc] | [next] | [standalone]
| From | Ulf Hansson <ulf.hansson@linaro.org> |
|---|---|
| Date | 2016-04-18 13:30 +0200 |
| Message-ID | <rpfxo-4Gt-5@gated-at.bofh.it> |
| In reply to | #1379738 |
On 15 April 2016 at 13:16, Masahiro Yamada <yamada.masahiro@socionext.com> wrote: > 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> Thanks, applied for next! Kind regards Uffe > --- > > drivers/mmc/core/mmc.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c > index 4dbe3df..c96bc81 100644 > --- a/drivers/mmc/core/mmc.c > +++ b/drivers/mmc/core/mmc.c > @@ -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 */ > -- > 1.9.1 >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web