From patchwork Thu Jan 26 21:50:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9540173 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3A022604A9 for ; Thu, 26 Jan 2017 22:05:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2961F2824F for ; Thu, 26 Jan 2017 22:05:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E42126E75; Thu, 26 Jan 2017 22:05:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1DD9826E75 for ; Thu, 26 Jan 2017 22:05:31 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cWsAX-0003Br-Qs; Thu, 26 Jan 2017 22:05:25 +0000 Received: from mail-wm0-f67.google.com ([74.125.82.67]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cWsA1-0001i9-KZ; Thu, 26 Jan 2017 22:04:55 +0000 Received: by mail-wm0-f67.google.com with SMTP id d140so53794318wmd.2; Thu, 26 Jan 2017 14:04:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=TF3DyPznFGffSU4MNnzi2BhnuOHWQAnSGijHLZqPj9c=; b=gG13Ih21jsP0QQiqGqrsc87zWCt8If0KsSLwqmnFQR2hkSutx+n7xUoGw55s91EWCY Z2WiurpYGFYjzJIz163oy10KBMmk/zIlvYFePrHZnPBJJ8Ky7Qdf6VnQvspPK/CWgLA+ zRx4Db1qLY+sIEQuPaX6Q27JMG1wwq4Lv8xogtjm7RK0eEWgm/ibtOexnY5jYTDKiwgW LFcwYOQJ/oDkKu1YF2IQa0di1EGP0rai28g86HNNMlsZBD/u1ve9rCeXaemkACH41OJo NRuTZdVQKFrktPF+Q7/YnsKYy1M8cbMkgPKZAj13fOhWg1Jqz0Y7w2RBAcZlvo4A7gfW Ndqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=TF3DyPznFGffSU4MNnzi2BhnuOHWQAnSGijHLZqPj9c=; b=NEUv3Q5JlK5mC4kPV3adJs792CnEj6/RtsN60WqL0kckuzfn2DigDKG+2nG8n3KnZW iFnddw+sHWb2jIXRNAeq+NtLJDcvL+7lHu+rRcTkz877SS0+T3eJvZMaMb3lvjRd0K/i XKMm2SG0x6ejDRWvvCpiB4ZicPS0dbi1rlmaW53ZVOtGkVyRz/PW+ifruQ7Zi9bPhbRK EiYarm27RO/kh8KkCTK56uhoGtewAKGFbpKSiJj0HspnFFClsHe9skKczmIp9JllerXI qW9SYvpxEzSKaW/ZVvcNxEffeoqRi2YIM/eCmH3S/GgnpweVb9h+3SzOllzAQAV3SiKs C0hA== X-Gm-Message-State: AIkVDXL3ozcaAWbiqWyJIkZ7Nv+2cjfYSSB3HmC6liBIZ2Fkvu6F0chlcOmM/qJJ7+CbYA== X-Received: by 10.28.178.142 with SMTP id b136mr463439wmf.69.1485468211430; Thu, 26 Jan 2017 14:03:31 -0800 (PST) Received: from ?IPv6:2003:c6:ebc5:6c00:4534:522a:e499:2bef? (p200300C6EBC56C004534522AE4992BEF.dip0.t-ipconnect.de. [2003:c6:ebc5:6c00:4534:522a:e499:2bef]) by smtp.googlemail.com with ESMTPSA id y80sm4659699wrb.12.2017.01.26.14.03.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jan 2017 14:03:31 -0800 (PST) From: Heiner Kallweit Subject: [PATCH 2/3] mmc: meson-gx: minor improvements in meson_mmc_set_ios To: Carlo Caione , Kevin Hilman , Ulf Hansson Message-ID: <4ec4f0af-c5c9-955c-6158-8c38aa61b358@gmail.com> Date: Thu, 26 Jan 2017 22:50:25 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170126_140453_837392_FA095D10 X-CRM114-Status: UNSURE ( 8.52 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP val isn't used in the switch clause and afterwards there's an identical statement. So remove it. In case of an unexpected bus width the error message indicates the intention to set the bus width to 4 and to go on. So remove the return statement. This return statement also conflicts with "setting to 4" because nothing would be set actually before returning. Signed-off-by: Heiner Kallweit Acked-by: Kevin Hilman --- drivers/mmc/host/meson-gx-mmc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index cf071756..41c54e02 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -379,7 +379,6 @@ static void meson_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) meson_mmc_clk_set(host, ios->clock); /* Bus width */ - val = readl(host->regs + SD_EMMC_CFG); switch (ios->bus_width) { case MMC_BUS_WIDTH_1: bus_width = CFG_BUS_WIDTH_1; @@ -394,7 +393,6 @@ static void meson_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) dev_err(host->dev, "Invalid ios->bus_width: %u. Setting to 4.\n", ios->bus_width); bus_width = CFG_BUS_WIDTH_4; - return; } val = readl(host->regs + SD_EMMC_CFG);