* [PATCH] mmc: core: remove redundant memset of mmc_decode_cid
@ 2016-03-11 16:35 Shawn Lin
2016-03-16 11:38 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: Shawn Lin @ 2016-03-11 16:35 UTC (permalink / raw)
To: Ulf Hansson; +Cc: linux-mmc, linux-kernel, Shawn Lin
When initializing sd or sdio card, we get struct mmc_card
from mmc_alloc_card which allocates it by kzalloc. So we don't
need another memset while decoding cid.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---
drivers/mmc/core/sd.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index bb39a29..b95bd24 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -74,8 +74,6 @@ void mmc_decode_cid(struct mmc_card *card)
{
u32 *resp = card->raw_cid;
- memset(&card->cid, 0, sizeof(struct mmc_cid));
-
/*
* SD doesn't currently have a version field so we will
* have to assume we can parse this.
--
2.3.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: core: remove redundant memset of mmc_decode_cid
2016-03-11 16:35 [PATCH] mmc: core: remove redundant memset of mmc_decode_cid Shawn Lin
@ 2016-03-16 11:38 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2016-03-16 11:38 UTC (permalink / raw)
To: Shawn Lin; +Cc: linux-mmc, linux-kernel
On 11 March 2016 at 17:35, Shawn Lin <shawn.lin@rock-chips.com> wrote:
> When initializing sd or sdio card, we get struct mmc_card
> from mmc_alloc_card which allocates it by kzalloc. So we don't
> need another memset while decoding cid.
>
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Thanks, applied for next!
Kind regards
Uffe
> ---
>
> drivers/mmc/core/sd.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
> index bb39a29..b95bd24 100644
> --- a/drivers/mmc/core/sd.c
> +++ b/drivers/mmc/core/sd.c
> @@ -74,8 +74,6 @@ void mmc_decode_cid(struct mmc_card *card)
> {
> u32 *resp = card->raw_cid;
>
> - memset(&card->cid, 0, sizeof(struct mmc_cid));
> -
> /*
> * SD doesn't currently have a version field so we will
> * have to assume we can parse this.
> --
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-16 11:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-11 16:35 [PATCH] mmc: core: remove redundant memset of mmc_decode_cid Shawn Lin
2016-03-16 11:38 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).