From patchwork Tue Jan 31 20:57:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9548505 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 80BF260415 for ; Tue, 31 Jan 2017 21:07:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 732D8280B0 for ; Tue, 31 Jan 2017 21:07:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67B1328304; Tue, 31 Jan 2017 21:07:40 +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 E2BD7280B0 for ; Tue, 31 Jan 2017 21:07:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750851AbdAaVHi (ORCPT ); Tue, 31 Jan 2017 16:07:38 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33760 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750860AbdAaVHh (ORCPT ); Tue, 31 Jan 2017 16:07:37 -0500 Received: by mail-wm0-f68.google.com with SMTP id v77so949404wmv.0 for ; Tue, 31 Jan 2017 13:07:36 -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=lK6op6UB9E2xcGRoy6h7YXrhjVlGhZ+Ur65kt6iZ/L8=; b=QuvUfH1OLojmrlsefB0N2kbSvWSFAZfb/xQxZi4fcow3Ji/V3vwzaF+EFJEryLmpqF /MZLo+MK46QpxYTrTwHiJjGIGFZs9a31M/XqPVr1LHmTtYJmOlXHJB+xu9swHtVxlBpm vstQRaPjhkqKF/Y/fBNYxzck2PIpAajKmybp2IhK2yj82gaqwlCuw9bRheIA1fvzkUPQ VDsE5K3UquNXEFZf+XlPsSonoFhLn88AXNyNjauXDD5lNfn2iU7sXfQ5+eIg/nww+3xS luHj5N+SRdWDJcvNVu4Qmc7Z2lhVIJ7Iam49ug91KtT3EmCTn+4sCFYdQuqeU8Ew1V6f e2Tg== 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=lK6op6UB9E2xcGRoy6h7YXrhjVlGhZ+Ur65kt6iZ/L8=; b=FgUGSzh2zqMH0s3C7z2IPO/7Q32Wk/UbZqH+r6jfz1bCx2Qp7540+H+FLym42M2kk5 IqGcf9Z16EwjKF7bUGlLZj6pEXO55cgtWwLHuCNFcm/Iee25bd4U80XurMUrQqKHyv66 BLTBYvi/YFK4v58SzFb0NeY6HfBtWU8vQTox0CeW009iKUnfj4Al4z9Q6IrBmDY8minD iM2H+h+h7orRLu/S/9o+N73h7g/PDaDjUt8E15Rbn3vfJJJTu7CJ2i6DHZeBIWNFc+Bb aCcq8/vAeNRMKUR4OLP8pK/uTYKv0kRH18fQ7gODcDjnG2u4X0h9hWGqXgP+rfjPSRF2 fnXQ== X-Gm-Message-State: AIkVDXIQ6IlmceLhJu7Zz9Sx/ABe+2Dpxid6333UJDZsg7WeAoXLHd00rOT22wkD/mZCiA== X-Received: by 10.28.56.195 with SMTP id f186mr22536069wma.20.1485896355901; Tue, 31 Jan 2017 12:59:15 -0800 (PST) Received: from ?IPv6:2003:c6:ebc5:6c00:bc31:e1d5:58cd:f318? (p200300C6EBC56C00BC31E1D558CDF318.dip0.t-ipconnect.de. [2003:c6:ebc5:6c00:bc31:e1d5:58cd:f318]) by smtp.googlemail.com with ESMTPSA id d29sm25886956wmi.19.2017.01.31.12.59.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Jan 2017 12:59:15 -0800 (PST) From: Heiner Kallweit Subject: [PATCH 2/9] mmc: meson-gx: minor improvements in meson_mmc_set_ios To: Ulf Hansson References: <24e8bf35-50ce-270d-c0aa-12bb90d2e3d8@gmail.com> Cc: Carlo Caione , Kevin Hilman , linux-mmc@vger.kernel.org Message-ID: <834a9dbd-9f6b-8dea-6713-e9bdcd09f9ed@gmail.com> Date: Tue, 31 Jan 2017 21:57:53 +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: <24e8bf35-50ce-270d-c0aa-12bb90d2e3d8@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 --- 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);