Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5552901rwb; Tue, 22 Nov 2022 01:23:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf5EWZQeVgnHNFDckdPl485SHOK6zVVIglcj/cJgKbspSNnb4rUXIuQAdagNESHzZRvdNFaP X-Received: by 2002:a17:907:11d1:b0:7a7:1d4f:c7dc with SMTP id va17-20020a17090711d100b007a71d4fc7dcmr5002256ejb.252.1669109034991; Tue, 22 Nov 2022 01:23:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669109034; cv=none; d=google.com; s=arc-20160816; b=oH/x3UYs4nkFgUCrq/w58tSC2HEW9FFuiV9ej1EJWSf18pWUS/kBX3HJhfQNjdY83Z E6BTlUdxtw8kbSRXeAudE+NY2FrK8auBfJCkGxKvrZN5EAgUXoHpI+ae18QfQlQtQ8UL iOmzA82puytPY6KbvoXOaa/qgrUmZqCvYldGPLqW+g5WGKBTnDThVrpkqksnnZyLtsHe hNLWZ3Oqx2jPnDJfFb30/2B6r+f09J/51J/fZx48SYZxs4w9FeBd/4nm5cc6FHd4jkog 6XQqWZh/PORUvdpQWpJZCuQdqrx67gy7hgxW6ynKTfFtbeyjyEQXWv2/HCNTrbSGde0j 4XSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Dl5xHVewpx2fk19bXxuzxpsb+MEbRXNPPKE4lln8zeE=; b=kjX14z2zI1E8utp+5aywp8yPgGb4bAieyv1FJ+9NItisCFwOQhTP88GWhUqfKMuZGM IPxvriH7va2hLglNvP5r9eIGwQfm3GE4F8EftErlse3rU7/1aTJYiZkwbW9o0+mYCgGX L+IbbzysaEk8opIwkA8Axd4So+ZQqhpwWd/3VVg8QtEwOpFSjekwrp3jTa0ayoUz9wXf Jyv6MySPHD6Xqvt08EF5gDNwiXjyQ33qpJrJRO7dZXEiZ8dP+qFJeAe6pZ6BjSJzEZij xbWeT0syeOcyVHq4v4w8Q6slVYoCV29dz+Yxdvvt8MEIgmQzKkzap4rdPxPiGSoB7noM VG2g== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g14-20020a056402090e00b0045cb68ca4ecsi13005132edz.37.2022.11.22.01.23.32; Tue, 22 Nov 2022 01:23:54 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233230AbiKVJJF (ORCPT + 91 others); Tue, 22 Nov 2022 04:09:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233253AbiKVJIr (ORCPT ); Tue, 22 Nov 2022 04:08:47 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE79845EF2 for ; Tue, 22 Nov 2022 01:08:43 -0800 (PST) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oxPGd-0001NA-6P; Tue, 22 Nov 2022 10:08:35 +0100 Received: from mfe by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1oxPGc-0004Sf-0k; Tue, 22 Nov 2022 10:08:34 +0100 Date: Tue, 22 Nov 2022 10:08:33 +0100 From: Marco Felsch To: ye.xingchen@zte.com.cn Cc: shawnguo@kernel.org, chi.minghao@zte.com.cn, s.hauer@pengutronix.de, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH] bus: imx-weim: use devm_platform_get_and_ioremap_resource() Message-ID: <20221122090833.5nqm52jzoxxxu2sj@pengutronix.de> References: <202211220940526866294@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202211220940526866294@zte.com.cn> User-Agent: NeoMutt/20180716 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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: X-Mailing-List: linux-kernel@vger.kernel.org Hi Chi, thanks for your patch. On 22-11-22, ye.xingchen@zte.com.cn wrote: > From: Minghao Chi > > 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: Minghao Chi > Signed-off-by: ye xingchen LGTM, feel free to add my Reviewed-by: Marco Felsch > --- > drivers/bus/imx-weim.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c > index 828c66bbaa67..2a6b4f676458 100644 > --- a/drivers/bus/imx-weim.c > +++ b/drivers/bus/imx-weim.c > @@ -263,7 +263,6 @@ static int weim_parse_dt(struct platform_device *pdev) > static int weim_probe(struct platform_device *pdev) > { > struct weim_priv *priv; > - struct resource *res; > struct clk *clk; > void __iomem *base; > int ret; > @@ -273,8 +272,7 @@ static int weim_probe(struct platform_device *pdev) > return -ENOMEM; > > /* get the resource */ > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - base = devm_ioremap_resource(&pdev->dev, res); > + base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); > if (IS_ERR(base)) > return PTR_ERR(base); > > -- > 2.25.1 > >