public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: torvalds@linux-foundation.org
Cc: akpm@linux-foundation.org, asselsm@gmail.com, linux-mmc@vger.kernel.org
Subject: [patch 008/203] mmc: sd: clean up redundant memset
Date: Wed, 26 May 2010 14:41:58 -0700	[thread overview]
Message-ID: <201005262141.o4QLfwB6015332@imap1.linux-foundation.org> (raw)

From: Mark Asselstine <asselsm@gmail.com>

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.

Signed-off-by: Mark Asselstine <asselsm@gmail.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/mmc/core/sd_ops.c |    2 --
 1 file changed, 2 deletions(-)

diff -puN drivers/mmc/core/sd_ops.c~mmc-sd-clean-up-redundant-memset drivers/mmc/core/sd_ops.c
--- a/drivers/mmc/core/sd_ops.c~mmc-sd-clean-up-redundant-memset
+++ a/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 */
_

                 reply	other threads:[~2010-05-26 21:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201005262141.o4QLfwB6015332@imap1.linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=asselsm@gmail.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox