From patchwork Wed Mar 15 02:31:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 69933 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2102456wrd; Tue, 14 Mar 2023 19:42:10 -0700 (PDT) X-Google-Smtp-Source: AK7set8Iq79amvItSDtJpebXr0e7hUY2ePSM2lqJmTVWJXBfHbJB2hh8zavXDRELQhJXg3twBFY4 X-Received: by 2002:a62:1b8a:0:b0:622:3c78:eaf8 with SMTP id b132-20020a621b8a000000b006223c78eaf8mr8707829pfb.24.1678848130507; Tue, 14 Mar 2023 19:42:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678848130; cv=none; d=google.com; s=arc-20160816; b=z8aDhCB8+OtMgtKh3ZFKmbH07ua6fNwWetkZ48d2qy19sWZIrvI3Socuz65H5jCKsX peI8SXpbAvnfRM5T3N8jPP1ahaROJEG8y02OTLT8peUZWx+NUdKOze14URX8oWoaudJu SmdohNb1vvPxF7lbdLj5R0A4Obrd+6x9XJMC9Ern2bdfm78wdkegVzwPRW+xY3PieAxa MHQ8FPIlfqu0axH/hyutkFfjndsXEeaKdKPigomhZszmdWa/KP6fB1OCQ0ijNj2lFOG0 sccIE4oaIir3EXYaEZ+N8qxxK0oRd1QgqCBR7beO7nS7hWp9otrvOX4j2J8z4DGxGHkH lIBw== 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=A1cR0GffWYjW1pipRrPEnUR/umpy+C1RmEY+rSyZs0o=; b=PH0lyQEEhfkIr3xtKEqDKLCx0C5wZqhf3r5PvH0mz6pgmeReicJgVQzMh9qNArRh4e Fsh6nD/+GyYNapB2/oLNf8A4ricLnHDen3fo8RVMuRA7YIv5FyisuPZwPiS4oJylbnnV 38gDHbSlJGh7qnAX/PkbelRhtRGI9aALAkGVzYFtNpu7AimNzJCzRpfop29bdo0d1s3M GqcCJCnqspf2fqJgfHgLmgkUs/CBvJyilMkOpSdujamm5IIRNDU9WTZjrRq/9+1qe/fM k+1LMPLJd3C7eb2yXDc83HFrImCQT0R7FL2rPe3tloIOkCdkohO90yzy40isMu4vQS2S ZEHw== 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 z14-20020aa79f8e000000b005a91c22496esi1423520pfr.159.2023.03.14.19.41.56; Tue, 14 Mar 2023 19:42:10 -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 S229815AbjCOCbS (ORCPT + 99 others); Tue, 14 Mar 2023 22:31:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229778AbjCOCbQ (ORCPT ); Tue, 14 Mar 2023 22:31:16 -0400 Received: from out30-119.freemail.mail.aliyun.com (out30-119.freemail.mail.aliyun.com [115.124.30.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 045FF5D45F; Tue, 14 Mar 2023 19:31:12 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R871e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0VduGZVi_1678847469; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VduGZVi_1678847469) by smtp.aliyun-inc.com; Wed, 15 Mar 2023 10:31:10 +0800 From: Yang Li To: will@kernel.org Cc: mark.rutland@arm.com, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] perf: qcom: Use devm_platform_get_and_ioremap_resource() Date: Wed, 15 Mar 2023 10:31:08 +0800 Message-Id: <20230315023108.36953-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760399856822771380?= X-GMAIL-MSGID: =?utf-8?q?1760399856822771380?= 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 --- drivers/perf/qcom_l3_pmu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/perf/qcom_l3_pmu.c b/drivers/perf/qcom_l3_pmu.c index 346311a05460..2887edb4eb0b 100644 --- a/drivers/perf/qcom_l3_pmu.c +++ b/drivers/perf/qcom_l3_pmu.c @@ -763,8 +763,7 @@ static int qcom_l3_cache_pmu_probe(struct platform_device *pdev) .capabilities = PERF_PMU_CAP_NO_EXCLUDE, }; - memrc = platform_get_resource(pdev, IORESOURCE_MEM, 0); - l3pmu->regs = devm_ioremap_resource(&pdev->dev, memrc); + l3pmu->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &memrc); if (IS_ERR(l3pmu->regs)) return PTR_ERR(l3pmu->regs);