From patchwork Mon Sep 17 05:30:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 10602093 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4D1E2112B for ; Mon, 17 Sep 2018 05:34:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3978A295D4 for ; Mon, 17 Sep 2018 05:34:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 299C9295D7; Mon, 17 Sep 2018 05:34: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=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 BC3ED295D4 for ; Mon, 17 Sep 2018 05:34:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=a5R0tBU5TfEK4BxQ7scBO7ujrcjDv8w2zBtSHdqOc9Q=; b=EUslLvOvCWLvBw x5F4qLpR8MJcFbprvLPd2jqdRVbpHXWtKRoqkDgehfXMZrmjFfzp2unLR0fe2QRvlv7fPZAH6y5D1 5GnNrrsQePGVMQWGbspABO2uo+/YiGZ0FVYIiwq/xiOj6EZbv0+chQC+3KroPMMk/Xgznng+87hDH WijmU7v4ow0VDd4HlJxiB6fZHBB6P5ZcmsHhzZQ5165bjHSGWVw3crkZkZM7eqC+L9cZ2FxSGdFJX 6KsX7qSNjc432sM7TO9xMjRnRo2C7Uqilbtp5afhlKsj1rS+ebgaT1iUGYHT271znhtqKwmQsD1ri gV7PlHWO/FoihBJtk/TQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g1mBC-0004EE-7P; Mon, 17 Sep 2018 05:34:38 +0000 Received: from mail-sn1nam01on0082.outbound.protection.outlook.com ([104.47.32.82] helo=NAM01-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g1mB7-0004Cj-Ag for linux-arm-kernel@lists.infradead.org; Mon, 17 Sep 2018 05:34:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector1-synaptics-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5UxpyRyy+ygjK9kSEx0ttCabd1NkwW2+oEbmjxdWMUo=; b=He2IMNPFL/14FjpZfilqM9fcUm4yNno4MVoWcIJ4p/fE1V/ucvmz05gRAcd0x9eKMYUzqR69JWmEH9gaXmDMWNG9Ki0OUWojglwt7kOhxWB1UX/h2L/6CVn2dI5vJ5YXPjlS1w6JCwS2Sz+eq6EkMtHM6OW2eSLUZzALFVQR5k0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; Received: from xhacker.debian (124.74.246.114) by BLUPR0301MB1571.namprd03.prod.outlook.com (2a01:111:e400:52a9::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Mon, 17 Sep 2018 05:34:14 +0000 Date: Mon, 17 Sep 2018 13:30:41 +0800 From: Jisheng Zhang To: Adrian Hunter , Ulf Hansson Subject: [PATCH mmc-next] mmc: sdhci: fix __sdhci_adma_write_desc Message-ID: <20180917133041.66100101@xhacker.debian> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Originating-IP: [124.74.246.114] X-ClientProxiedBy: OSBPR01CA0005.jpnprd01.prod.outlook.com (2603:1096:603::17) To BLUPR0301MB1571.namprd03.prod.outlook.com (2a01:111:e400:52a9::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e589456f-b7f1-4a5c-10b3-08d61c5f357d X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BLUPR0301MB1571; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1571; 3:3OwQa+QoJnigHoHGyXMfNpaX8fqhomADOh2CJ2YViT2CVP/oUgNbvSs3ZSFnfcWt3Wn5Baf4LoSnXwwWfuKUIz2OEnfqp6YOkGq/qptO78Md2NnWDXTUJNS/6Z6JYUjzFatjIkvaSlG1GNDyOiltlLb4pvpdrTNqR3lcnaKMe7PDVziIMFaiR5W2e7axwPO7JqnZyPadvIYIix0uf+3AlWFYlyYlnWh3HFCF0usOIpGOPMm8x0EuWtvQdldTpYUN; 25:D8gG8Wt3dDUwND6HXT41bseS0yHsLioDWzHo2Ywa/BqgYUPQpk2GMO36O0+QjM908puOljTs9ddApl2b/B6GQljST1c70/Z4oQEcmtHpDKyQ32cEua9suL4FamOY29VZzI0OUXIzuz5KrO9YiRQGa5AJY8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Y+Z1rdR2nyKZpf4dBmHfpZBGKLtAiND0FF5GfohSFydF4jRnw0qSsnDcfzqb/VnjNYtMY0ONRaFo8Q1l0fAClZE/ALUtmMj9dXjfDW8KdJRzSMMNwTc8lgqVCnXrB2tGKxceCXPjGfMNYF+jt6yEfwv0NF7hgKbb7jRyYjjIHibQMhvxqShhwgyfFi88ojL4WxZ2EtNF1/BINNIHXNcji/KtpUSkQH++kUOWQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699050); SRVR:BLUPR0301MB1571; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0301MB1571; X-Forefront-PRVS: 0798146F16 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(39850400004)(346002)(396003)(136003)(366004)(199004)(189003)(53936002)(55016002)(1970100002)(26005)(186003)(16526019)(33896004)(106356001)(7696005)(8266002)(52116002)(97736004)(68736007)(97876018)(86362001)(2906002)(6506007)(386003)(105586002)(486006)(25786009)(476003)(956004)(50226002)(8676002)(4326008)(8936002)(81166006)(81156014)(9686003)(5660300001)(7736002)(478600001)(305945005)(117636001)(72206003)(66066001)(23726003)(1076002)(6116002)(3846002)(50466002)(230700001)(6666003)(110136005)(70486001)(47776003)(316002)(39210200001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0301MB1571; H:xhacker.debian; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: synaptics.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0301MB1571; 23:WsH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E74SGH1hdpvGTFixk6xO5nwmg==; 5:PPQqNiSBj4GJwjJWDMuMDlbgKgVqlkSwr4zj/+BAZD6slKNenk6nmBRwA2dprJDZNTZeY32ZBkuBAEGoTcMGaomuQDvAf/UX22n1vBv5NkuqB6gPmIdbYNKlAle7YsNph6NVWam7BkuIJlgtjUYk3A9449tKYywfUesIC/rWd4A=; 7:dUaEMgbwZs9xCUWHx5OiCfilnYQLIlFYeCVbulBdRgg2Ka4/QGf+GzGVTdAbpb25inSi2YGwxeYMOa8aBoTJmoFApWdF4Vwc8+pB+2wLE5Lfbj4EhdWERBraxNtz8qeBqFteDr4D0E07YtkALE4VCTVsC3v2yBuPSlbsFThjVeLcM9DdynpmpoK3gBwGz0pIut5jrI24/8iA9iMk0pPGPmb4UIK/PHjUVPrc7covGOzgyrZ25d3A7TkytFXr3G1e SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2018 05:34:14.6977 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e589456f-b7f1-4a5c-10b3-08d61c5f357d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0301MB1571 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180916_223433_403841_07FCB7FF X-CRM114-Status: GOOD ( 10.77 ) X-BeenThere: linux-arm-kernel@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-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP If hosts provides ops->adma_write_desc, we should not fall back to the general sdhci_adma_write_desc(). Signed-off-by: Jisheng Zhang Acked-by: Adrian Hunter --- Hi Ulf, Adrian, When I introduced .adma_write_desc, I made a mistake since v4 -- if the host provide ops->adma_write_desc, we should just call it and don't fall back to the general sdhci_adma_write_desc(). Before v4, the adma_write_desc return int, since v4 there's no return value, so when I prepared the v4, I just removed return, this is where the mistake is from. I dunno how to handle this case, fold the patch into previous commit or apply it as a separate patch? I'm very sorry for this. In fact, Adrian caught another similar bug during review. Sorry about the inconvenience, Jisheng drivers/mmc/host/sdhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 0dda6f4b6a24..99bdae53fa2e 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -649,8 +649,8 @@ static inline void __sdhci_adma_write_desc(struct sdhci_host *host, { if (host->ops->adma_write_desc) host->ops->adma_write_desc(host, desc, addr, len, cmd); - - sdhci_adma_write_desc(host, desc, addr, len, cmd); + else + sdhci_adma_write_desc(host, desc, addr, len, cmd); } static void sdhci_adma_mark_end(void *desc)