From patchwork Wed Feb 1 06:48:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9548937 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 70D2860415 for ; Wed, 1 Feb 2017 06:49:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 61D1727E3E for ; Wed, 1 Feb 2017 06:49:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5673D2811C; Wed, 1 Feb 2017 06:49:49 +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 F20FE27E3E for ; Wed, 1 Feb 2017 06:49:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751145AbdBAGts (ORCPT ); Wed, 1 Feb 2017 01:49:48 -0500 Received: from mail-wj0-f195.google.com ([209.85.210.195]:35188 "EHLO mail-wj0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751004AbdBAGtr (ORCPT ); Wed, 1 Feb 2017 01:49:47 -0500 Received: by mail-wj0-f195.google.com with SMTP id i7so12152225wjf.2 for ; Tue, 31 Jan 2017 22:49:47 -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=XF9UJaELPZxN0kC2MP/0Jml2jaay32O2GP7wyyGguFA=; b=iH0BDaPjCfLoIlGHxuIlE/ldli3Y5WsBgwVY7qLD7HdyS/MLSER/v5ETIxe9ru8ZuM W7FR4XKmZOqdqRTyvNxTxLwmfvexasvoQ6S89SaCiTqeuYqfHJhQl6yvT8sNKFZanAmp ZTHAkgmO5vixhRFCz27/zrfngn5jJprAZSY/RRTr6h2qlL4W8AjZEbjOvMUJCZ3/+VCw 08M9noXQmVRO6zOJTUpncbLBX5fkLe6dLdZBSzjwx5jFH3glb5fo06KJ+RnwI+WuxPlf GAd5erRPsPx6Rul8k/BXH9ZoBxZcDOXSjQNP1WHD5g3AB0USYJ9uRXxAlkIyywajW2Nw gXYA== 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=XF9UJaELPZxN0kC2MP/0Jml2jaay32O2GP7wyyGguFA=; b=rIOcyXcglmD4CJhW98p2IOzl+7Baz0cdRmZqsxxWcOmL0exUavUmy7iZSQctsRp0jg gUZFBg5W4iLwzUq0t27K9+kjwxi/W/8N8kAUH5ThnydCQn1Wv/KXCsOZE/D+NBrAmJt1 WzpqHFj1AkaQOjty8JhwEJvXHu2lrnK8RspyPJBxlvbFDAw+O7qg+PWyAON1oEp2yVlh dwvGq8v38rR86m3wrInOmKEetbTXNR5k6gShD6DwN9/0L+NgNYdpAcBlZAIDoYKSESKi +K8d61R5OYv7dzRBvn0Szz+iVi8ziAzP7cgo7GE0k4gzwy9E1GPWYzxzKcoI9fwv36ZO V5Mw== X-Gm-Message-State: AIkVDXLBC5PlA6QMFUkv+sUlOkugEBWrd2w72KGeIwlACWWbivkFhtu/sPK+6M6B1UEjUQ== X-Received: by 10.223.130.118 with SMTP id 109mr1280375wrb.10.1485931786205; Tue, 31 Jan 2017 22:49:46 -0800 (PST) Received: from ?IPv6:2003:c6:ebc5:6c00:c4cb:dab7:ab36:4977? (p200300C6EBC56C00C4CBDAB7AB364977.dip0.t-ipconnect.de. [2003:c6:ebc5:6c00:c4cb:dab7:ab36:4977]) by smtp.googlemail.com with ESMTPSA id b87sm27835989wmi.0.2017.01.31.22.49.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Jan 2017 22:49:45 -0800 (PST) From: Heiner Kallweit Subject: [PATCH v2 2/9] mmc: meson-gx: minor improvements in meson_mmc_set_ios To: Ulf Hansson , Carlo Caione , Kevin Hilman References: <584e5061-d359-1436-05ee-3767a5a4b10f@gmail.com> Cc: linux-mmc@vger.kernel.org, linux-amlogic@lists.infradead.org Message-ID: <6c3b7dbe-fb65-b40d-2625-342e2bd48776@gmail.com> Date: Wed, 1 Feb 2017 07:48:28 +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: <584e5061-d359-1436-05ee-3767a5a4b10f@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. Signed-off-by: Heiner Kallweit Acked-by: Kevin Hilman --- v2: - added acked-by --- 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 da3cce31..38edc60d 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);