Patchwork [U-Boot,u-boot,RFC,v1] mmc: Remove unused variable backup from mmc_send_cmd()

login
register
mail settings
Submitter Oleksandr Tyshchenko
Date Aug. 6, 2013, 10:50 a.m.
Message ID <1375786210-8029-1-git-send-email-oleksandr.tyshchenko@ti.com>
Download mbox | patch
Permalink /patch/265002/
State Accepted
Delegated to: Pantelis Antoniou
Headers show

Comments

Oleksandr Tyshchenko - Aug. 6, 2013, 10:50 a.m.
Do not call a memset for unused variable backup every time.
Remove unused variable from function.

Signed-off-by: Oleksandr Tyshchenko <oleksandr.tyshchenko@ti.com>
---
 drivers/mmc/mmc.c |    3 ---
 1 file changed, 3 deletions(-)
Pantelis Antoniou - Sept. 6, 2013, 11:40 a.m.
Hi Oleksandr,

On Aug 6, 2013, at 1:50 PM, Oleksandr Tyshchenko wrote:

> Do not call a memset for unused variable backup every time.
> Remove unused variable from function.
> 
> Signed-off-by: Oleksandr Tyshchenko <oleksandr.tyshchenko@ti.com>

Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>

Thanks

Patch

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 73f7195..c9cb9ff 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -71,11 +71,8 @@  int board_mmc_getcd(struct mmc *mmc)__attribute__((weak,
 static int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
 			struct mmc_data *data)
 {
-	struct mmc_data backup;
 	int ret;
 
-	memset(&backup, 0, sizeof(backup));
-
 #ifdef CONFIG_MMC_TRACE
 	int i;
 	u8 *ptr;