All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] davinci, mmc: fix gcc 4.6 build warnings
Date: Mon, 31 Oct 2011 06:15:53 +0100	[thread overview]
Message-ID: <1320038153-24364-1-git-send-email-hs@denx.de> (raw)

Fix:
davinci_mmc.c: In function 'dmmc_wait_fifo_status':
davinci_mmc.c:72:7: warning: variable 'mmcstatus1' set but not used [-Wunused-but-set-variable]
davinci_mmc.c: In function 'dmmc_busy_wait':
davinci_mmc.c:89:7: warning: variable 'mmcstatus1' set but not used [-Wunused-but-set-variable]

Delete the unused variable.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
---
 drivers/mmc/davinci_mmc.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c
index 5d918e6..ce96736 100644
--- a/drivers/mmc/davinci_mmc.c
+++ b/drivers/mmc/davinci_mmc.c
@@ -69,8 +69,8 @@ static void dmmc_set_clock(struct mmc *mmc, uint clock)
 static int
 dmmc_wait_fifo_status(volatile struct davinci_mmc_regs *regs, uint status)
 {
-	uint mmcstatus1, wdog = WATCHDOG_COUNT;
-	mmcstatus1 = get_val(&regs->mmcst1);
+	uint wdog = WATCHDOG_COUNT;
+
 	while (--wdog && ((get_val(&regs->mmcst1) & status) != status))
 		udelay(10);
 
@@ -86,9 +86,8 @@ dmmc_wait_fifo_status(volatile struct davinci_mmc_regs *regs, uint status)
 /* Busy bit wait loop for MMCST1 */
 static int dmmc_busy_wait(volatile struct davinci_mmc_regs *regs)
 {
-	uint mmcstatus1, wdog = WATCHDOG_COUNT;
+	uint wdog = WATCHDOG_COUNT;
 
-	mmcstatus1 = get_val(&regs->mmcst1);
 	while (--wdog && (get_val(&regs->mmcst1) & MMCST1_BUSY))
 		udelay(10);
 
-- 
1.7.6.4

             reply	other threads:[~2011-10-31  5:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-31  5:15 Heiko Schocher [this message]
2011-11-16 19:51 ` [U-Boot] [PATCH] davinci, mmc: fix gcc 4.6 build warnings Wolfgang Denk

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=1320038153-24364-1-git-send-email-hs@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.