From patchwork Mon Oct 31 05:15:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 122732 X-Patchwork-Delegate: s-paulraj@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 84F52B6F77 for ; Mon, 31 Oct 2011 16:16:01 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 975F028D13; Mon, 31 Oct 2011 06:15:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wodSKbC0-BE8; Mon, 31 Oct 2011 06:15:58 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 14D6128CFB; Mon, 31 Oct 2011 06:15:58 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2363128CFB for ; Mon, 31 Oct 2011 06:15:56 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mT+9vFcYwFP1 for ; Mon, 31 Oct 2011 06:15:55 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from pollux.denx.de (host-82-135-33-74.customer.m-online.net [82.135.33.74]) by theia.denx.de (Postfix) with ESMTP id BF5FE28C87 for ; Mon, 31 Oct 2011 06:15:54 +0100 (CET) Received: by pollux.denx.de (Postfix, from userid 515) id 325B5122B; Mon, 31 Oct 2011 06:15:54 +0100 (CET) From: Heiko Schocher To: u-boot@lists.denx.de Date: Mon, 31 Oct 2011 06:15:53 +0100 Message-Id: <1320038153-24364-1-git-send-email-hs@denx.de> X-Mailer: git-send-email 1.7.6.4 Cc: Heiko Schocher Subject: [U-Boot] [PATCH] davinci, mmc: fix gcc 4.6 build warnings X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 Cc: Sandeep Paulraj Cc: Albert ARIBAUD --- 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(®s->mmcst1); + uint wdog = WATCHDOG_COUNT; + while (--wdog && ((get_val(®s->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(®s->mmcst1); while (--wdog && (get_val(®s->mmcst1) & MMCST1_BUSY)) udelay(10);