From patchwork Thu Jun 5 21:14:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 4308901 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 70748BEEAA for ; Thu, 5 Jun 2014 21:15:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8F24420265 for ; Thu, 5 Jun 2014 21:15:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 72A4820256 for ; Thu, 5 Jun 2014 21:15:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751821AbaFEVPH (ORCPT ); Thu, 5 Jun 2014 17:15:07 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:64278 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752497AbaFEVPF (ORCPT ); Thu, 5 Jun 2014 17:15:05 -0400 Received: from wuerfel.lan (HSI-KBW-134-3-133-35.hsi14.kabel-badenwuerttemberg.de [134.3.133.35]) by mrelayeu.kundenserver.de (node=mreue005) with ESMTP (Nemesis) id 0LehC6-1WRa3X3MdC-00qSc7; Thu, 05 Jun 2014 23:14:54 +0200 From: Arnd Bergmann To: Chris Ball Cc: Ulf Hansson , linux-mmc@vger.kernel.org, Arnd Bergmann , Nicolas Pitre , Thomas Petazzoni , Jason Cooper , Andrew Lunn Subject: [PATCH 2/4] mmc: mvsdio: avoid compiler warning Date: Thu, 5 Jun 2014 23:14:39 +0200 Message-Id: <1402002881-1986640-3-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1402002881-1986640-1-git-send-email-arnd@arndb.de> References: <1402002881-1986640-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:dfmY86FJ51JBaiOVBK2uf2jfN95pdhUN3N9Kw+22t9R mqFgL6FTyrKSAS43h6WWkxIJFD/we/cHz885xH8tNHHUFbpDO3 85NR/OYKFYrTcnh3O7OhAt3EgGCFdTT+AyyGGnkr3r1MM2TmoE +Z7jnrWNvEggbubheXXddWjeth9pTAEIv2zyMG5UfjJamFQkh0 H0BsCeDjBQG50DWGAZH5MCRa5eNx42q7gPERBQtwZuj9dGztHT hVgruuYVDuWO0HzBjv6g851V8eHEZ9+BJDGK+SgyDTfnYJ9tyy WE6O89zz/lwPJbOx0+LbTUx67MKPOFwKyutLvBntqOSIJ/zE7u 8ZYtpz0om+L3MgJUrQ2c/SLi+XI+02Xkc9HkH86/G Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP gcc correctly points out that hw_state can be used uninitially in the mvsd_setup_data() function. This rearranges the function to ensure it always contains a proper value. Signed-off-by: Arnd Bergmann Cc: Nicolas Pitre Cc: Chris Ball Cc: Thomas Petazzoni Cc: Jason Cooper Cc: Andrew Lunn Cc: linux-mmc@vger.kernel.org Acked-by: Nicolas Pitre --- drivers/mmc/host/mvsdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c index 9377284..6b4c5ad 100644 --- a/drivers/mmc/host/mvsdio.c +++ b/drivers/mmc/host/mvsdio.c @@ -79,11 +79,11 @@ static int mvsd_setup_data(struct mvsd_host *host, struct mmc_data *data) unsigned long t = jiffies + HZ; unsigned int hw_state, count = 0; do { + hw_state = mvsd_read(MVSD_HW_STATE); if (time_after(jiffies, t)) { dev_warn(host->dev, "FIFO_EMPTY bit missing\n"); break; } - hw_state = mvsd_read(MVSD_HW_STATE); count++; } while (!(hw_state & (1 << 13))); dev_dbg(host->dev, "*** wait for FIFO_EMPTY bit "