Message ID | 202211101726100208529@zte.com.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp45438wru; Thu, 10 Nov 2022 01:43:08 -0800 (PST) X-Google-Smtp-Source: AMsMyM7H4jwx55po2i2OCzIR+/tEJCm962qbkxg2HaQ0ESqSeiajjmZ1o6z8kRfspe4SGhHj1i/Q X-Received: by 2002:a17:907:5ce:b0:730:bae0:deb with SMTP id wg14-20020a17090705ce00b00730bae00debmr59975124ejb.181.1668073388070; Thu, 10 Nov 2022 01:43:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668073388; cv=none; d=google.com; s=arc-20160816; b=u1SyVgywVFJCwU9a0ghcd1GKf79gLmQEInc/xioQ5lLObZLmteam1Ecs4RPQTD5GaL u875R0p6cLwcWWP7lcOjuK2Odz0u/MBHsfxZbrWStC6tuBeCxFrTj+1X8O5Fyv+/PQbG HLeOd/7aGBbTyEgJlpFvCmTcyGePCLF6mKMoCokvNk5d6yMoEAt5tM+fav3RMeX3CDOC WAQ2NeUmc/twkeQGx/Vy3wXY+KRiRt62+vGi2lhR3KHGSaiFSuf76YAgX+YuRVJcATKH I+EGIm5pfAny7rKXBZkvMRoIwTSlOVAJPwWLte6iBWedotvVWCP4wYBTsNIC9rN0kuy0 jyWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=nJ4HMCWjrpi+m6HyoDuetv3C7D9CHcpkWRcqUlv9hDU=; b=yPj/p9oU5Z4lgEoaWoS/PDmvC3zdLNzMTbwVbef2lLkbp/VMuYo44k+DdzPrNKvt8K Ib7LD1Li3pXlrE3nhhbF+6yq+QfeNMz6/tseOuECZJnGMlWCgXq7eTM1LQVZVeVnHdqx XzcWTggcVJ5ho/X6KDr5lpty08e/ktlsCQzxnhcmtygaC0/9XhCuDxjmsbLjdHp+F0Y3 REE7pASONoEXvQYvVYbdlie+o+fchuogBEcj9Wy51gSQLb9kNpwqhM3w9dmKAJVjUUE1 BSr6iz9f3iFwrdvTE9fj0HxjQwSOfNBt3pY9gRFckEPT8rEAtp3oAP9aCAbCra6Z0W9o Nopw== 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=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cr17-20020a170906d55100b007ae9f42f86esi3053924ejc.383.2022.11.10.01.42.42; Thu, 10 Nov 2022 01:43:08 -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=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229938AbiKJJf0 (ORCPT <rfc822;winker.wchi@gmail.com> + 99 others); Thu, 10 Nov 2022 04:35:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbiKJJfX (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 10 Nov 2022 04:35:23 -0500 X-Greylist: delayed 533 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 10 Nov 2022 01:35:23 PST Received: from mxct.zte.com.cn (mxct.zte.com.cn [58.251.27.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B8C766CA6; Thu, 10 Nov 2022 01:35:23 -0800 (PST) Received: from mxde.zte.com.cn (unknown [10.35.20.121]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mxct.zte.com.cn (FangMail) with ESMTPS id 4N7Gg85rWDz4RKj; Thu, 10 Nov 2022 17:26:28 +0800 (CST) Received: from mxus.zte.com.cn (unknown [10.207.168.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mxde.zte.com.cn (FangMail) with ESMTPS id 4N7Gg50HwTz9vXH6; Thu, 10 Nov 2022 17:26:25 +0800 (CST) Received: from mxhk.zte.com.cn (unknown [192.168.250.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mxus.zte.com.cn (FangMail) with ESMTPS id 4N7Gg21CQPzdmYkl; Thu, 10 Nov 2022 17:26:22 +0800 (CST) Received: from mxct.zte.com.cn (unknown [192.168.251.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4N7Gfy6jWcz8R044; Thu, 10 Nov 2022 17:26:18 +0800 (CST) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxct.zte.com.cn (FangMail) with ESMTPS id 4N7Gfw1Tdrz4y0v5; Thu, 10 Nov 2022 17:26:16 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl2.zte.com.cn with SMTP id 2AA9Q73N006088; Thu, 10 Nov 2022 17:26:07 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp02[null]) by mapi (Zmail) with MAPI id mid31; Thu, 10 Nov 2022 17:26:10 +0800 (CST) Date: Thu, 10 Nov 2022 17:26:10 +0800 (CST) X-Zmail-TransId: 2afa636cc3b2ffffffff85b1899c X-Mailer: Zmail v1.0 Message-ID: <202211101726100208529@zte.com.cn> Mime-Version: 1.0 From: <ye.xingchen@zte.com.cn> To: <vkoul@kernel.org> Cc: <f.fainelli@gmail.com>, <bcm-kernel-feedback-list@broadcom.com>, <rjui@broadcom.com>, <sbranden@broadcom.com>, <dmaengine@vger.kernel.org>, <linux-rpi-kernel@lists.infradead.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org> Subject: =?utf-8?q?=5BPATCH=5D_dmaengine=3A_use_devm=5Fplatform=5Fget=5Fand?= =?utf-8?q?=5Fioremap=5Fresource=28=29?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl2.zte.com.cn 2AA9Q73N006088 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.251.14.novalocal with ID 636CC3C3.000 by FangMail milter! X-FangMail-Envelope: 1668072389/4N7Gg85rWDz4RKj/636CC3C3.000/10.35.20.121/[10.35.20.121]/mxde.zte.com.cn/<ye.xingchen@zte.com.cn> X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 636CC3C3.000/4N7Gg85rWDz4RKj X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY 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?1749100297013399509?= X-GMAIL-MSGID: =?utf-8?q?1749101721310113349?= |
Series |
dmaengine: use devm_platform_get_and_ioremap_resource()
|
|
Commit Message
ye.xingchen@zte.com.cn
Nov. 10, 2022, 9:26 a.m. UTC
From: Minghao Chi <chi.minghao@zte.com.cn> 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. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> --- drivers/dma/bcm2835-dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Comments
Hi, On 11/10/2022 2:56 PM, ye.xingchen@zte.com.cn wrote: > From: Minghao Chi <chi.minghao@zte.com.cn> > > 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. > > Reported-by: Zeal Robot <zealci@zte.com.cn> > Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> > --- > drivers/dma/bcm2835-dma.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c > index 630dfbb01a40..1547f528a58e 100644 > --- a/drivers/dma/bcm2835-dma.c > +++ b/drivers/dma/bcm2835-dma.c > @@ -902,8 +902,7 @@ static int bcm2835_dma_probe(struct platform_device *pdev) > > dma_set_max_seg_size(&pdev->dev, 0x3FFFFFFF); > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - base = devm_ioremap_resource(&pdev->dev, res); > + base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); > if (IS_ERR(base)) > return PTR_ERR(base); > LGTM. Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com> -Mukesh
On 11/10/22 11:26, ye.xingchen@zte.com.cn wrote: > [You don't often get email from ye.xingchen@zte.com.cn. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > From: Minghao Chi <chi.minghao@zte.com.cn> > > 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. Would you review my v3 instead? https://lore.kernel.org/lkml/20221110152528.7821-1-tudor.ambarus@microchip.com/ The intention is to do this small change for all the dma drivers in a single patch, so that we don't pollute the commit log. > > Reported-by: Zeal Robot <zealci@zte.com.cn> > Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> > --- > drivers/dma/bcm2835-dma.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c > index 630dfbb01a40..1547f528a58e 100644 > --- a/drivers/dma/bcm2835-dma.c > +++ b/drivers/dma/bcm2835-dma.c > @@ -902,8 +902,7 @@ static int bcm2835_dma_probe(struct platform_device *pdev) > > dma_set_max_seg_size(&pdev->dev, 0x3FFFFFFF); > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - base = devm_ioremap_resource(&pdev->dev, res); > + base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); > if (IS_ERR(base)) > return PTR_ERR(base); > > -- > 2.25.1 > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -- Cheers, ta
diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c index 630dfbb01a40..1547f528a58e 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -902,8 +902,7 @@ static int bcm2835_dma_probe(struct platform_device *pdev) dma_set_max_seg_size(&pdev->dev, 0x3FFFFFFF); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(base)) return PTR_ERR(base);