Message ID | 20230216090610.130860-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:adf:eb09:0:0:0:0:0 with SMTP id s9csp192921wrn; Thu, 16 Feb 2023 01:09:09 -0800 (PST) X-Google-Smtp-Source: AK7set8LdnxCJuHcXdSicJLKMy57C6ZhrE4CNl0ZXvCdiyc+/2oE7VXgrNfAToM31s+ZP6yphtzi X-Received: by 2002:a17:907:7f0a:b0:8aa:c035:a651 with SMTP id qf10-20020a1709077f0a00b008aac035a651mr7456536ejc.37.1676538549225; Thu, 16 Feb 2023 01:09:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676538549; cv=none; d=google.com; s=arc-20160816; b=OKE2OjULAelDcz7BYA+YfXkumguzpQs8N6gFrHuHJo2Nty5h8XlzkVxwENgxivA1Ux FcOGy6/M1yW6Ci2PvQU3iRk6hcD8Vvh/PJss1irLKIYRgLZNEKCPo6XhPc2EE+2OwmpA 6cDDXFQ9C4X2tGzQHMBn1Yrwiqaj0QPQr33PV91rBHl7jO9VFj72ewTwsdOrIuYFX/rf UKB6/JzGB3YHHtz3mdZG733Bh8rOT6dL2RZu4kZWNdcWcqhxpBmAJvJzZryR8xi4iHFc tOOlMBME5GOsO1j65l2Q1T3dKwxzfUZ/lWprlpURK1ss26NI4ybslWA0/vN0ntVSWGWX XCRQ== 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=5zgHofakFLYkpUgcG4E/uJHwfxyL/GUxlIShFYrMaW8=; b=mvyzNH3g3fWt0L8jB0p5hdeb3tAZHYc5szRBrpORdSqnQDwt1yWfrQMn2JTNvLyHUU aqUBpAuTLjkKKkNASYYLNd6G5aZGTcJKbiLwx8kcZsukttUCEYE4lL6OlXmJIAUctxMV P6c2jXJtlYye8y/W7z1ZtRC1Y8bevutfBTDbhhAMUWEB9ny8BKDZpmBdsQRJ43r4PiQj azSTj/o7vEoWBKwjKXEwiNZikUPXLawlNKE/GuIgsHNYOfwjTKqg5gEIwd1JYQAeYhl0 Is5ZuhPEWUIkxatjp5L1NgMmj7qgtYvnhG/bqZUqrZ7WwxtT5SOwmO6UWOyd1Rtq3Kv4 QW/g== 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 uo39-20020a170907cc2700b008b150a6dab1si1488424ejc.208.2023.02.16.01.08.45; Thu, 16 Feb 2023 01:09:09 -0800 (PST) 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 S229633AbjBPJGT (ORCPT <rfc822;hadasmailinglist@gmail.com> + 99 others); Thu, 16 Feb 2023 04:06:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbjBPJGR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 16 Feb 2023 04:06:17 -0500 Received: from out30-113.freemail.mail.aliyun.com (out30-113.freemail.mail.aliyun.com [115.124.30.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D28562E837; Thu, 16 Feb 2023 01:06:15 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_---0Vbnt.KT_1676538372; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0Vbnt.KT_1676538372) by smtp.aliyun-inc.com; Thu, 16 Feb 2023 17:06:12 +0800 From: Yang Li <yang.lee@linux.alibaba.com> To: kuba@kernel.org Cc: davem@davemloft.net, edumazet@google.com, pisa@cmp.felk.cvut.cz, ondrej.ille@gmail.com, wg@grandegger.com, mkl@pengutronix.de, pabeni@redhat.com, linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li <yang.lee@linux.alibaba.com> Subject: [PATCH -next] can: ctucanfd: Use devm_platform_ioremap_resource() Date: Thu, 16 Feb 2023 17:06:10 +0800 Message-Id: <20230216090610.130860-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,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?1757978085287394628?= X-GMAIL-MSGID: =?utf-8?q?1757978085287394628?= |
Series |
[-next] can: ctucanfd: Use devm_platform_ioremap_resource()
|
|
Commit Message
Yang Li
Feb. 16, 2023, 9:06 a.m. UTC
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to Use devm_platform_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/net/can/ctucanfd/ctucanfd_platform.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Comments
On Thursday 16 of February 2023 10:06:10 Yang Li wrote: > Convert platform_get_resource(), devm_ioremap_resource() to a single > call to Use devm_platform_ioremap_resource(), as this is exactly > what this function does. > > Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz> > --- > drivers/net/can/ctucanfd/ctucanfd_platform.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/net/can/ctucanfd/ctucanfd_platform.c > b/drivers/net/can/ctucanfd/ctucanfd_platform.c index > f83684f006ea..a17561d97192 100644 > --- a/drivers/net/can/ctucanfd/ctucanfd_platform.c > +++ b/drivers/net/can/ctucanfd/ctucanfd_platform.c > @@ -47,7 +47,6 @@ static void ctucan_platform_set_drvdata(struct device > *dev, */ > static int ctucan_platform_probe(struct platform_device *pdev) > { > - struct resource *res; /* IO mem resources */ > struct device *dev = &pdev->dev; > void __iomem *addr; > int ret; > @@ -55,8 +54,7 @@ static int ctucan_platform_probe(struct platform_device > *pdev) int irq; > > /* Get the virtual base address for the device */ > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - addr = devm_ioremap_resource(dev, res); > + addr = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(addr)) { > ret = PTR_ERR(addr); > goto err;
From: Yang Li <yang.lee@linux.alibaba.com> Date: Thu, 16 Feb 2023 17:06:10 +0800 > Convert platform_get_resource(), devm_ioremap_resource() to a single > call to Use devm_platform_ioremap_resource(), as this is exactly > what this function does. > > Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com> > --- > drivers/net/can/ctucanfd/ctucanfd_platform.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/net/can/ctucanfd/ctucanfd_platform.c b/drivers/net/can/ctucanfd/ctucanfd_platform.c > index f83684f006ea..a17561d97192 100644 > --- a/drivers/net/can/ctucanfd/ctucanfd_platform.c > +++ b/drivers/net/can/ctucanfd/ctucanfd_platform.c > @@ -47,7 +47,6 @@ static void ctucan_platform_set_drvdata(struct device *dev, > */ > static int ctucan_platform_probe(struct platform_device *pdev) > { > - struct resource *res; /* IO mem resources */ > struct device *dev = &pdev->dev; > void __iomem *addr; > int ret; > @@ -55,8 +54,7 @@ static int ctucan_platform_probe(struct platform_device *pdev) > int irq; > > /* Get the virtual base address for the device */ > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - addr = devm_ioremap_resource(dev, res); > + addr = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(addr)) { > ret = PTR_ERR(addr); > goto err; Thanks, Olek
On 16.02.2023 17:06:10, Yang Li wrote: > Convert platform_get_resource(), devm_ioremap_resource() to a single > call to Use devm_platform_ioremap_resource(), as this is exactly > what this function does. > > Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Applied to linux-can-next/testing. Thanks, Marc
diff --git a/drivers/net/can/ctucanfd/ctucanfd_platform.c b/drivers/net/can/ctucanfd/ctucanfd_platform.c index f83684f006ea..a17561d97192 100644 --- a/drivers/net/can/ctucanfd/ctucanfd_platform.c +++ b/drivers/net/can/ctucanfd/ctucanfd_platform.c @@ -47,7 +47,6 @@ static void ctucan_platform_set_drvdata(struct device *dev, */ static int ctucan_platform_probe(struct platform_device *pdev) { - struct resource *res; /* IO mem resources */ struct device *dev = &pdev->dev; void __iomem *addr; int ret; @@ -55,8 +54,7 @@ static int ctucan_platform_probe(struct platform_device *pdev) int irq; /* Get the virtual base address for the device */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - addr = devm_ioremap_resource(dev, res); + addr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(addr)) { ret = PTR_ERR(addr); goto err;