Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1356917 > unrolled thread
| Started by | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| First post | 2016-03-14 05:50 +0100 |
| Last post | 2016-03-16 12:40 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] mmc: core: remove redundant memset of sdio_read_cccr Shawn Lin <shawn.lin@rock-chips.com> - 2016-03-14 05:50 +0100
Re: [PATCH] mmc: core: remove redundant memset of sdio_read_cccr Ulf Hansson <ulf.hansson@linaro.org> - 2016-03-16 12:40 +0100
| From | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| Date | 2016-03-14 05:50 +0100 |
| Subject | [PATCH] mmc: core: remove redundant memset of sdio_read_cccr |
| Message-ID | <rcsC7-7iI-47@gated-at.bofh.it> |
When initializing sdio card, we get struct mmc_card from mmc_alloc_card which allocates it by kzalloc. So we don't need another memset while reading cccr. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> --- drivers/mmc/core/sdio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 467b3cf..bd44ba8 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -106,8 +106,6 @@ static int sdio_read_cccr(struct mmc_card *card, u32 ocr) unsigned char data; unsigned char speed; - memset(&card->cccr, 0, sizeof(struct sdio_cccr)); - ret = mmc_io_rw_direct(card, 0, 0, SDIO_CCCR_CCCR, 0, &data); if (ret) goto out; -- 2.3.7
[toc] | [next] | [standalone]
| From | Ulf Hansson <ulf.hansson@linaro.org> |
|---|---|
| Date | 2016-03-16 12:40 +0100 |
| Message-ID | <rdhXY-8lR-11@gated-at.bofh.it> |
| In reply to | #1356917 |
On 14 March 2016 at 05:41, Shawn Lin <shawn.lin@rock-chips.com> wrote: > When initializing sdio card, we get struct mmc_card > from mmc_alloc_card which allocates it by kzalloc. So we > don't need another memset while reading cccr. > > Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Thanks, applied for next! Kind regards Uffe > --- > > drivers/mmc/core/sdio.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c > index 467b3cf..bd44ba8 100644 > --- a/drivers/mmc/core/sdio.c > +++ b/drivers/mmc/core/sdio.c > @@ -106,8 +106,6 @@ static int sdio_read_cccr(struct mmc_card *card, u32 ocr) > unsigned char data; > unsigned char speed; > > - memset(&card->cccr, 0, sizeof(struct sdio_cccr)); > - > ret = mmc_io_rw_direct(card, 0, 0, SDIO_CCCR_CCCR, 0, &data); > if (ret) > goto out; > -- > 2.3.7 > >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web