Skip to contentSkip to conversation

mmc: sd: clean up redundant memset

PATCH New [email protected] 1 participant 1 message May 26, 2010 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 8/203 mmc: sd: clean up redundant memset

From: Mark Asselstine <[email protected]>

The clearing of mrq via a memset at the top of the for loop in mmc_wait_for_app_cmd() is not required as mrq is not used and there is another clearing of mrq just below. We remove the first memset since if the initial tests in the for loop fail the memset is not required.

---

 drivers/mmc/core/sd_ops.c |    2 --
 1 file changed, 2 deletions(-)
drivers/mmc/core/sd_ops.c renamed from drivers/mmc/core/sd_ops.c~mmc-sd-clean-up-redundant-memset +0 -2
diff -puN drivers/mmc/core/sd_ops.c~mmc-sd-clean-up-redundant-memset drivers/mmc/core/sd_ops.c
@@ -79,8 +79,6 @@ int mmc_wait_for_app_cmd(struct mmc_host
 	 * we cannot use the retries field in mmc_command.
 	 */
 	for (i = 0;i <= retries;i++) {
-		memset(&mrq, 0, sizeof(struct mmc_request));
-
 		err = mmc_app_cmd(host, card);
 		if (err) {
 			/* no point in retrying; no APP commands allowed */

_