From patchwork Tue Feb 7 21:34:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9561283 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 A54AD602B1 for ; Tue, 7 Feb 2017 21:49:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95E8028475 for ; Tue, 7 Feb 2017 21:49:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8841F2847B; Tue, 7 Feb 2017 21:49:36 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A09028475 for ; Tue, 7 Feb 2017 21:49:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932533AbdBGVpc (ORCPT ); Tue, 7 Feb 2017 16:45:32 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:34150 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932457AbdBGVp3 (ORCPT ); Tue, 7 Feb 2017 16:45:29 -0500 Received: by mail-wm0-f67.google.com with SMTP id c85so30745942wmi.1 for ; Tue, 07 Feb 2017 13:45:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=9nkSYem1OX3x1czzY1oiA9cfbjQBx8ATKAAnRt3fUTw=; b=bWyRjBcET5UwcapCs7Da9fYEqbva+67MfZy4icQP1Etqc5LrMYu2DtXrSgm4XOK30+ nv+vr0A7ir1voUMjwPyk5RqdBwNL5IMz/+zQ60og1yJEksbLsNYX8ZKgcmS2IpNgCWkr ZR5MooLsXyO3h0frajumFMZcLFOzlRiKgBBX7wMVPxUo0lnz9mfGiSG6sdw7bIj2i8SA 955IIiTgy07+8ygkG1lwEq1rZSvSDJ2oWKGiuDss588hG3EFA7m8+lyzYGd2F3aaGwOd 3imti/OI7LWNE5hIHk6CTfYd4m2F8/0egW7YUaY77GYI2YJZ+upaHvv0UkXq6/OVR/1d bvHw== 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:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=9nkSYem1OX3x1czzY1oiA9cfbjQBx8ATKAAnRt3fUTw=; b=faCTINkarPDREas0htEjgs8Z+tWtZ+yjs3k/2oLg7xWb43kOWF4igfGfUGSuYlKT/D 3tkuj4NoJi490fVGcSbpizSp6B22njHBSwcro/XymB4lrW3QACDK13p9XfSnCOfodfC2 H8V76DmqupHFTlZmIAf7WfrFBYMT5LgufGDoQUJV2A6DqM5VTaQaxrxPBmx2s1SBeZBG D8N3Bwqfo4DQ26KbI+BA/GmiZXq5ftFqmTWuLTeUx7WL3wZ9QmKzTqwq55dWOE+9B+e7 +7uAFWrjOsiuRfuQ9BLdl9SO33HlJmW/8rmsv7p3guUbUFBX7QZeNDcHuEi9RXqgajX5 nNxw== X-Gm-Message-State: AMke39l05IeY8xV0t6mgydA4sLpgxRmI9qzupTuInBlHDM48Q3ssuhKp2zpNYDmgGbQiig== X-Received: by 10.28.209.7 with SMTP id i7mr14293999wmg.115.1486503373788; Tue, 07 Feb 2017 13:36:13 -0800 (PST) Received: from ?IPv6:2003:c6:ebce:1e00:cd3f:c3c7:98c5:4fec? (p200300C6EBCE1E00CD3FC3C798C54FEC.dip0.t-ipconnect.de. [2003:c6:ebce:1e00:cd3f:c3c7:98c5:4fec]) by smtp.googlemail.com with ESMTPSA id n10sm9398495wrb.9.2017.02.07.13.36.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2017 13:36:13 -0800 (PST) From: Heiner Kallweit Subject: [PATCH v3 2/9] mmc: meson-gx: minor improvements in meson_mmc_set_ios To: Ulf Hansson , Kevin Hilman References: <0991d40b-e05b-2fcb-9ee4-7b529448de69@gmail.com> Cc: Carlo Caione , "linux-mmc@vger.kernel.org" , linux-amlogic@lists.infradead.org Message-ID: <07e0b346-1ae8-6745-0e9b-de15a6525823@gmail.com> Date: Tue, 7 Feb 2017 22:34:06 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <0991d40b-e05b-2fcb-9ee4-7b529448de69@gmail.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.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. 4bit bus width are chosen as default as the vendor driver does it too. Signed-off-by: Heiner Kallweit Acked-by: Kevin Hilman --- v3: - extended commit message --- 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 ef2ce725..9d79df7c 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -371,7 +371,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; @@ -386,7 +385,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);