diff mbox

mmc: core: remove redundant memset of sdio_read_cccr

Message ID 1457930493-19021-1-git-send-email-shawn.lin@rock-chips.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shawn Lin March 14, 2016, 4:41 a.m. UTC
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(-)

Comments

Ulf Hansson March 16, 2016, 11:38 a.m. UTC | #1
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
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;