Message ID | 20230315054113.48898-1-yang.lee@linux.alibaba.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2154612wrd; Tue, 14 Mar 2023 22:52:55 -0700 (PDT) X-Google-Smtp-Source: AK7set/DOZGAmt9N3HuO2O+Uh2LhjXf7mXdmcWd2WQDLEtyAtdADg9x9fPtwqp+PvyamoRJylhC3 X-Received: by 2002:a17:90b:4a4e:b0:236:6a28:f783 with SMTP id lb14-20020a17090b4a4e00b002366a28f783mr16497502pjb.15.1678859574936; Tue, 14 Mar 2023 22:52:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678859574; cv=none; d=google.com; s=arc-20160816; b=SoUaMD8arwOFxpji5+ESo0vxJOGEQ6Md+4ftY9erBbZ17g9L8iJ3qRJGz5ORrWYVul yN4o2KT2Jo+uEHT8QCkAQc5WfeZACSL80IvzG8ObBJ7nPJZinrS/06GmblnJULQr/p+q 5N5S6IAi7Jyoti6Up/wWdePLPdqtfcSM4+JeFXmu/13ZP9pOvnMvpTR6oC5UA8sfIVeL Dn5Zyqr0YgDxoe5VN+SPvTT7AZj9iasZnjB/V7Y0St9o3R+sD8FQqPnaVzFkvCZBnukG Vq89DsZQtzjgCzeEQy31s/TCSggkcIEzQa01f3RG774xCuea0SkCQlN/EJk7vTWTlJfz 1Mng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=gpEFAt+KVXzlpIykTHIor21+woK7p4A6jf0cV5dwhhc=; b=KCzf2VZzucqt93ytyxR5J5mGFTVAOljX9CbhJNSwwdx0JHbC01OijhsxtlmHWCOJYU gaVQzXB7yzhYw6Ew3NsnsvQ9POJ78e6526ZB5VcDSyekP3jz6BUKtjkVWZoesYwBNMk1 ovS9sCnmpJLznO1891Q0qcPkCUJ1BvNv/SgTGQ+OWKNsnFxIvIPVn2XgQNvHF9pMOxrz WVcEpkUhSRBURFeqGplq8XzKs1pNM0nVdUbBXb/pm4fCnEqL6NSeTw3bdIpAIDzkV6HS 9QN4sEZ9w4vTPqgvBvx4EtNR4x8tJNqKVySY4BaOmQzinrdf+LRTbVbrtUgClZStbidi Wavw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y189-20020a6364c6000000b00502f1395a67si4080402pgb.190.2023.03.14.22.52.40; Tue, 14 Mar 2023 22:52:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231574AbjCOFl3 (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Wed, 15 Mar 2023 01:41:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231550AbjCOFlZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 15 Mar 2023 01:41:25 -0400 Received: from out30-101.freemail.mail.aliyun.com (out30-101.freemail.mail.aliyun.com [115.124.30.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D555252905; Tue, 14 Mar 2023 22:41:17 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R221e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VduqG3R_1678858874; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VduqG3R_1678858874) by smtp.aliyun-inc.com; Wed, 15 Mar 2023 13:41:15 +0800 From: Yang Li <yang.lee@linux.alibaba.com> To: ulf.hansson@linaro.org Cc: afaerber@suse.de, mani@kernel.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li <yang.lee@linux.alibaba.com> Subject: [PATCH -next] mmc: owl-mmc: Use devm_platform_get_and_ioremap_resource() Date: Wed, 15 Mar 2023 13:41:13 +0800 Message-Id: <20230315054113.48898-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760411857778833280?= X-GMAIL-MSGID: =?utf-8?q?1760411857778833280?= |
Series |
[-next] mmc: owl-mmc: Use devm_platform_get_and_ioremap_resource()
|
|
Commit Message
Yang Li
March 15, 2023, 5:41 a.m. UTC
According to commit 890cc39a8799 ("drivers: provide
devm_platform_get_and_ioremap_resource()"), convert
platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/mmc/host/owl-mmc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
On Wed, Mar 15, 2023 at 01:41:13PM +0800, Yang Li wrote: > According to commit 890cc39a8799 ("drivers: provide > devm_platform_get_and_ioremap_resource()"), convert > platform_get_resource(), devm_ioremap_resource() to a single > call to devm_platform_get_and_ioremap_resource(), as this is exactly > what this function does. > > Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> > --- > drivers/mmc/host/owl-mmc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/mmc/host/owl-mmc.c b/drivers/mmc/host/owl-mmc.c > index 3dc143b03939..6f9d31a886ba 100644 > --- a/drivers/mmc/host/owl-mmc.c > +++ b/drivers/mmc/host/owl-mmc.c > @@ -578,8 +578,7 @@ static int owl_mmc_probe(struct platform_device *pdev) > owl_host->mmc = mmc; > spin_lock_init(&owl_host->lock); > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); You forgot to remove the local variable which is now unused. Thanks, Mani > - owl_host->base = devm_ioremap_resource(&pdev->dev, res); > + owl_host->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); > if (IS_ERR(owl_host->base)) { > ret = PTR_ERR(owl_host->base); > goto err_free_host; > -- > 2.20.1.7.g153144c >
On Wed, Mar 15, 2023 at 01:09:26PM +0530, Manivannan Sadhasivam wrote: > On Wed, Mar 15, 2023 at 01:41:13PM +0800, Yang Li wrote: > > According to commit 890cc39a8799 ("drivers: provide > > devm_platform_get_and_ioremap_resource()"), convert > > platform_get_resource(), devm_ioremap_resource() to a single > > call to devm_platform_get_and_ioremap_resource(), as this is exactly > > what this function does. > > > > Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> > > --- > > drivers/mmc/host/owl-mmc.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/drivers/mmc/host/owl-mmc.c b/drivers/mmc/host/owl-mmc.c > > index 3dc143b03939..6f9d31a886ba 100644 > > --- a/drivers/mmc/host/owl-mmc.c > > +++ b/drivers/mmc/host/owl-mmc.c > > @@ -578,8 +578,7 @@ static int owl_mmc_probe(struct platform_device *pdev) > > owl_host->mmc = mmc; > > spin_lock_init(&owl_host->lock); > > > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > > You forgot to remove the local variable which is now unused. > Oops, no my bad. It is being used... Reviewed-by: Manivannan Sadhasivam <mani@kernel.org> Thanks, Mani > Thanks, > Mani > > > - owl_host->base = devm_ioremap_resource(&pdev->dev, res); > > + owl_host->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); > > if (IS_ERR(owl_host->base)) { > > ret = PTR_ERR(owl_host->base); > > goto err_free_host; > > -- > > 2.20.1.7.g153144c > > > > -- > மணிவண்ணன் சதாசிவம்
On Wed, 15 Mar 2023 at 06:41, Yang Li <yang.lee@linux.alibaba.com> wrote: > > According to commit 890cc39a8799 ("drivers: provide > devm_platform_get_and_ioremap_resource()"), convert > platform_get_resource(), devm_ioremap_resource() to a single > call to devm_platform_get_and_ioremap_resource(), as this is exactly > what this function does. > > Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Applied for next, thanks! Kind regards Uffe > --- > drivers/mmc/host/owl-mmc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/mmc/host/owl-mmc.c b/drivers/mmc/host/owl-mmc.c > index 3dc143b03939..6f9d31a886ba 100644 > --- a/drivers/mmc/host/owl-mmc.c > +++ b/drivers/mmc/host/owl-mmc.c > @@ -578,8 +578,7 @@ static int owl_mmc_probe(struct platform_device *pdev) > owl_host->mmc = mmc; > spin_lock_init(&owl_host->lock); > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - owl_host->base = devm_ioremap_resource(&pdev->dev, res); > + owl_host->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); > if (IS_ERR(owl_host->base)) { > ret = PTR_ERR(owl_host->base); > goto err_free_host; > -- > 2.20.1.7.g153144c >
diff --git a/drivers/mmc/host/owl-mmc.c b/drivers/mmc/host/owl-mmc.c index 3dc143b03939..6f9d31a886ba 100644 --- a/drivers/mmc/host/owl-mmc.c +++ b/drivers/mmc/host/owl-mmc.c @@ -578,8 +578,7 @@ static int owl_mmc_probe(struct platform_device *pdev) owl_host->mmc = mmc; spin_lock_init(&owl_host->lock); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - owl_host->base = devm_ioremap_resource(&pdev->dev, res); + owl_host->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(owl_host->base)) { ret = PTR_ERR(owl_host->base); goto err_free_host;