Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDA1FC61DA3 for ; Tue, 21 Feb 2023 06:45:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233272AbjBUGp5 (ORCPT ); Tue, 21 Feb 2023 01:45:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233134AbjBUGpz (ORCPT ); Tue, 21 Feb 2023 01:45:55 -0500 Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A6682449A for ; Mon, 20 Feb 2023 22:45:53 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R601e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=xueshuai@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0VcB2AGO_1676961949; Received: from 30.240.112.34(mailfrom:xueshuai@linux.alibaba.com fp:SMTPD_---0VcB2AGO_1676961949) by smtp.aliyun-inc.com; Tue, 21 Feb 2023 14:45:50 +0800 Message-ID: <4afeec62-573d-a863-951a-bb73081e44d2@linux.alibaba.com> Date: Tue, 21 Feb 2023 14:45:47 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: [PATCH -next] drivers/perf: Use devm_platform_get_and_ioremap_resource() Content-Language: en-US To: Yang Li Cc: will@kernel.org, mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230216063403.9753-1-yang.lee@linux.alibaba.com> From: Shuai Xue In-Reply-To: <20230216063403.9753-1-yang.lee@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/2/16 PM2:34, Yang Li wrote: > 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 > --- > drivers/perf/alibaba_uncore_drw_pmu.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/perf/alibaba_uncore_drw_pmu.c b/drivers/perf/alibaba_uncore_drw_pmu.c > index a7689fecb49d..5c5be9fc1b15 100644 > --- a/drivers/perf/alibaba_uncore_drw_pmu.c > +++ b/drivers/perf/alibaba_uncore_drw_pmu.c > @@ -656,8 +656,7 @@ static int ali_drw_pmu_probe(struct platform_device *pdev) > drw_pmu->dev = &pdev->dev; > platform_set_drvdata(pdev, drw_pmu); > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - drw_pmu->cfg_base = devm_ioremap_resource(&pdev->dev, res); > + drw_pmu->cfg_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); > if (IS_ERR(drw_pmu->cfg_base)) > return PTR_ERR(drw_pmu->cfg_base); > LGTM. Thank you. Reviewed-by: Shuai Xue Best Regards, Shuai