Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp27433360rwd; Tue, 4 Jul 2023 02:57:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlHtj0fmd5FXMtjxPSJ2/DX/ZLxSdV/Y8QEGUOo6dZ7w8WBDW89jPWQ0sUefKcpTae4nQJgw X-Received: by 2002:a05:6808:d4f:b0:3a3:bf6a:ba55 with SMTP id w15-20020a0568080d4f00b003a3bf6aba55mr2070712oik.3.1688464621055; Tue, 04 Jul 2023 02:57:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688464621; cv=pass; d=google.com; s=arc-20160816; b=j3IOTqSOK0lw8O379nz6D5GD4DOiFrs3aWCPx/FFPBfTNGBN9e6wn4OX+PDpw0TbUD UMSLZ27G1U44G4zsmAADKGugwijNaAxFdGvIrWmExqR0u+hAeLLlMWZgVunJ1txrworo 1zaU566qEntiWtfVBkJySrVS5Qef7Git4XYk+FWCjCwLEGuzoUOCdZtLEtQ3AevraTdK 0sD71cGD0OpTw+QiNt3JSZLSPkYIddc+xLF6Xh3I7cljCVW8nyTTRLysAT4exWFKMSNq PZtoNkr3ZP+ib5UuRHyGq5YmlkRZrgNufkR1KgptOpDuCri3pjiHOjLJMlN6ZU3D5BuO VlEQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=e8OI6ew5GZ+/KaN67nm4MzAPYFmmgTlVTFAFcXnpJFA=; fh=OLzWSqBgDOTFX9b+QFPfada3k/fJLnSt6qDMUyO0HDQ=; b=QPvANMw2wt0mc36QOerUru7iYv0qEeEFQ/p4mxpGnHBNot0+T9+0lEZ41g42KRAU3Y qoLM5NXu9vMa1r0onQlVp+nJUldKpGeoZMfj6tbmuNpXsVZKS+Ve+Wvx4D6EHJmLvmXJ XJNlroBcrN77K1hZwz+pKVa03xIWlJO1KrOzGR1DvvxTOASfiteFWCQNnvofc37Oxol7 T0t+UWwTEj98XTxoiYVBPJnPVtbUp+wcAuSuj+SDp2//ajia6nW9Xew12rAgZR6TQodM xk8xfI18RYRhM0b5eXPvntPbVyPfCgKOBU+ZyafPMJWFr+VfutJEdfTTxcG89Tyl3Rh3 VBaw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=FsbFWwLS; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fb9-20020a056a002d8900b0064d4d472935si14148133pfb.18.2023.07.04.02.56.38; Tue, 04 Jul 2023 02:57:01 -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; dkim=pass header.i=@vivo.com header.s=selector2 header.b=FsbFWwLS; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231700AbjGDJkL (ORCPT + 99 others); Tue, 4 Jul 2023 05:40:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231962AbjGDJjy (ORCPT ); Tue, 4 Jul 2023 05:39:54 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2072d.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::72d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5212226BA for ; Tue, 4 Jul 2023 02:37:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BcVfzsGOHiY38m4ej3oXRK5RsN0B7czlgmp/WQRtxs9bgGA/eLLTilnjA0vO1666YNobY3fq4pNbTAwqQpsO+23xVE3K+XAeTrvoNch/5FFqFYtIeJ/YezGY4UCBhAMw0MjgNYBlvxmGWi7qzw83Yi/7AhrZm7cvZYiYzkeGGBKEZxu5b4iJpWBuExAezx6bMN1yXUyQowaXUVXGYEkqyMDQo6jOdccqXkQCBVUOGfeIY5QflefsBN3QW35nVwaX7cK0RANmtham1tYGS2CUEvcUmkOT5vmF1h2mmxJ4Kai4qMNrkiQZVumQrLkAb95nBF16SPC6E2fNA9wlMF9FKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=e8OI6ew5GZ+/KaN67nm4MzAPYFmmgTlVTFAFcXnpJFA=; b=LB6jQ5er+hYObP4M7zMK1qxg2ZkI5TvCzs/yv7Aesy+aMWt8m7EgbQuXub+FXszo/ob1lATREG38IKiOzxXBx+dp7KRtXVfSw/H4UaYFBjjf27ZKX3K4sbDckZ1gnYeX2kaDFEOYVepiLAEHKWoHsVNXXg8wi6JsogmI0KTvaEtGUhBTTd1yORzLbTLcBAoj2USiuCCwFReQq1hduFWrIAd2vLS69VT+QFub9ttOBUu+GbDZD5l/2OMP33svXB8AYlIoFPaWuQE5wV6bfvA7WxPKdw5elL2iRU6LM87NmFWWCzhl4AZUYEtbETMEBAPC1L9R/owpmDNfubg8opoa8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e8OI6ew5GZ+/KaN67nm4MzAPYFmmgTlVTFAFcXnpJFA=; b=FsbFWwLS8oepSxV0riZ9f4qzkC1p781rLf3mkDhndJqMampq3PQyDqjDSP7MRul7fNCIy+ou5d6qPdwrW9ScLEkzjQMgVXpbk+QA1MggeHzG072tTCvT1PqLMESjawpM83mUMNpk30N8hV3UtUCDUwIeLK2NPCRTL6GcjDmqqsppRlh2JT3E0jO1YkUbJERlRIrZCa7jFRtkvMhdzX4zkx54p1RH4bUSw0NCwB0kKkR/AO4hL7H6RCe8LnJM/7BLrIXEfxPbzhkSGC7zZOl4PcfndT8UWsIE/J9xyqcE61/hA3Xy0cTWP4SRWB+NxNp1mzA6hHCxOA8/QKN3PqRkzg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by KL1PR0601MB5565.apcprd06.prod.outlook.com (2603:1096:820:c2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Tue, 4 Jul 2023 09:36:12 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6544.024; Tue, 4 Jul 2023 09:36:11 +0000 From: Yangtao Li To: Khuong Dinh , Will Deacon , Mark Rutland Cc: Yangtao Li , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] perf: xgene_pmu: Convert to devm_platform_ioremap_resource() Date: Tue, 4 Jul 2023 17:35:55 +0800 Message-Id: <20230704093556.17926-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR02CA0031.apcprd02.prod.outlook.com (2603:1096:4:195::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB5565:EE_ X-MS-Office365-Filtering-Correlation-Id: 6c8d6a8e-91ee-49cc-60f5-08db7c7219f1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zVtQmB7foY7sCJDXjRHMknNM/6ubDbTKpkONjZ9gKaunXWYVgNzzFepsm60AK2iUC+tJ6SWKSMZIKeTQBzbqYNqFo1hbBkSuMaMk3zZt/pQtucLZ8Sd3epYLdH485Mf3tn8hKV26uLAO0UZfj7PoNwE8bEoT0qz/u3V/fGXjp2PSM+zYHUvrnz/nplS8j+5kEUVY6o//gVkvNnG/8ER6DNhpk5pXvgJvWLV/sl/2pny2zvS25TunsmlHw6D38JSd07Awo+lTXF2Lzprf69gCIDQ/HRB3vO9/0kXSkiSjmSs0M1n9ABikXc77OT6JsV2Rmbt0wK77f+juiDoYExIuX6LzjJdOFHm1Quwehhtd0OdSx4pPVXbQ4IUrxYc7U3LYFGpuRObg4zZO+/DDk+mXXQuv9CJN4z4ywl3byRXrMtJPvsS4kITOwArEUTr6oPgyDOgx1kU+4TDuGgJ4k2cbQdkk3CUaZLLfe8+uqENL8tA8C2ScqnskThYLDQY+j0zQb8qYWvhwm9YnOpCHgF0WwaIc0juVWRrfmpWIdqk/+SNMNqFUq8jidUef0uai1CFwl5RCbx3l7fCcxuOV53/bYmOrmgkxcVYy8cpmVaEYKy44hipDyiW/mh+MAOCjOZDp X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(376002)(346002)(39860400002)(366004)(396003)(451199021)(38350700002)(478600001)(110136005)(6666004)(5660300002)(8676002)(36756003)(8936002)(86362001)(2906002)(38100700002)(66476007)(4326008)(66946007)(66556008)(316002)(41300700001)(83380400001)(26005)(186003)(1076003)(6506007)(2616005)(6486002)(52116002)(6512007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Az3O5Q3suSspK4usmLykOxDrhnl+adw32DjskrE5SYmRCLwrtaAFwN0dflUp?= =?us-ascii?Q?bg0ZcOHQeYAo0SnWxZKejtROpO9g+vjUVtevdQvy3jKRUM9dwTP1lyqDRity?= =?us-ascii?Q?H3TsMnhlq53gsz+meMrrFOjx3E0IX7Ae00hiJcw3ax+KEwucskDHLUDPa4Ls?= =?us-ascii?Q?xQZEvUDLz2c9WE2uok1ZFXc3/yFWzcVBP8fjeoygOiUrOSTSJGTm4solBjK/?= =?us-ascii?Q?YP8QmSuFvQgLMdyPAVvAi0tbe6EXejTKDAKCvdz+VsAfHxyLttL6l5M9TRFs?= =?us-ascii?Q?i7lXcW4ENuBkEJ/bx+VQQX8vcKxbbdUgL13w3Z5XzPbmeKBpzqywWukQu4eg?= =?us-ascii?Q?qojt9m/YVco8CyBfndxWEupegu23kGCIT1ChdVL3HHVi0F8L2+WkcgGf1G5J?= =?us-ascii?Q?vDdJ9+AbdR4DTlVfIf7HOx5NdqM1Qi1klp2DsVJbdcw2InBfeCo5hd+EHSgg?= =?us-ascii?Q?lNGGyVHF7rukNWk1uqqxSkkuMWUfdfvjum3NCcxX343v1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FoqRdRJ4cFV98VHFCt/45ZgMjpmcrP1Mc3NMX?= =?us-ascii?Q?nt0LLb6QwhZH4Az0oSfylgVCjLwM6CBqTOHuSNF5GIc7e6B95jX9sHVRmqux?= =?us-ascii?Q?PWcruKT3kHmA6NoDev5nnoaox/AVE3rzDCN7CXxBSMvnb4mroG+gCentJsjy?= =?us-ascii?Q?ud06Rv+pA2bhMdOVBneDljWW8u/efQ8BoaTpTddQ?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6c8d6a8e-91ee-49cc-60f5-08db7c7219f1 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2023 09:36:10.9590 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MXosgQbBk6czY1UEizHWkm41vViyuT9Cy46T/HOS5NM7NEmSyMFvFn9NOtet6z/fb/Wul3zr1DVfatvROO/W2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5565 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/perf/xgene_pmu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/perf/xgene_pmu.c b/drivers/perf/xgene_pmu.c index 0c32dffc7ede..9972bfc11a5c 100644 --- a/drivers/perf/xgene_pmu.c +++ b/drivers/perf/xgene_pmu.c @@ -1833,7 +1833,6 @@ static int xgene_pmu_probe(struct platform_device *pdev) const struct xgene_pmu_data *dev_data; const struct of_device_id *of_id; struct xgene_pmu *xgene_pmu; - struct resource *res; int irq, rc; int version; @@ -1883,8 +1882,7 @@ static int xgene_pmu_probe(struct platform_device *pdev) xgene_pmu->version = version; dev_info(&pdev->dev, "X-Gene PMU version %d\n", xgene_pmu->version); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - xgene_pmu->pcppmu_csr = devm_ioremap_resource(&pdev->dev, res); + xgene_pmu->pcppmu_csr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(xgene_pmu->pcppmu_csr)) { dev_err(&pdev->dev, "ioremap failed for PCP PMU resource\n"); return PTR_ERR(xgene_pmu->pcppmu_csr); -- 2.39.0