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: 9548953 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 784F160415 for ; Wed, 1 Feb 2017 06:50:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 681CF2841C for ; Wed, 1 Feb 2017 06:50:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5ABB42841D; Wed, 1 Feb 2017 06:50:22 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,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 2596D27F82 for ; Wed, 1 Feb 2017 06:50:22 +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 1cYok8-0004KF-Ma; Wed, 01 Feb 2017 06:50:12 +0000 Received: from mail-wj0-x243.google.com ([2a00:1450:400c:c01::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cYok4-00033x-0R for linux-amlogic@lists.infradead.org; Wed, 01 Feb 2017 06:50:09 +0000 Received: by mail-wj0-x243.google.com with SMTP id kq3so12140177wjc.3 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=kQ2uK4SDNi4JHmhYPh46Cpo9apcvDpZB75UrxzZM+IHA3KWTIR8O6e79RiJ6bSJOjU r3jNoUjITHtWvocI3vEwV5fDUdTPDkJ+q1EEh5nONUrqFHpNpid5yiArR+mZa036NqHO r/ttIEguHaWAraR+5xauBVtAdsJsOkI9HfcLJGHXua6y5j/aMtLVJEYj2m6OqJbjsoIy EAaaf9Mk0zO5Gq7NR9iyOl0OHrNWbUHOtdOL3N8txo2DDDLi+ab5qGGleBxX6z0pZ42t vYxyB7o6WLYlkL+TQl39OAB2+fBIKzUmginN+RrU4De5VD46C6seWv6GJ3TQhbiCt3Z/ Y+OA== X-Gm-Message-State: AIkVDXJO9eSnRrtVATOyQ3NKaxFiIX5tiaL16BGK0NVaT1X+ArMXzhVaUIW3ujIiVY0ifQ== 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> 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170131_225008_204831_3F78748A X-CRM114-Status: UNSURE ( 8.41 ) 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-mmc@vger.kernel.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 --- 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);