From patchwork Thu Jul 6 09:20:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13303417 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0DB3DEB64DC for ; Thu, 6 Jul 2023 09:21:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ftzbHvXiewch03PnCPSbIvLV8i2/bLe9G6iOWLS1wEs=; b=RA5TO8uonbPDfv QkVlsvMntkEEzInFBLRPN1vYwsoHK3J6AfuZjkEgDPb0NBDDnNWPwpo9aflKukD7CGOfN1ena+dGx pM8aY9Q7/7qK6Z0nfiL5+7fF3Dt7vgec9Jxgqn8xXSbk86R6VKHOW9SvyajeEMdCHUibkwqU3O+rN sroetPoGGNoK+wXH6mXZTSRQi1iHP6sbPob1msDKC1PYbcM+0/LUPVuisMrbH8srDN+Zf2V7st35T so8YR1xDxwOXTU3Jrm2CTUJQCdp92HtFmTjDzInyfigIi3AkQORi2Kp/FwQIUppJp9WTtep565Ruq 5ehHvqoosDTmI0f24giQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHLAo-0014MQ-2Z; Thu, 06 Jul 2023 09:21:14 +0000 Received: from mail-tyzapc01on20719.outbound.protection.outlook.com ([2a01:111:f403:704b::719] helo=APC01-TYZ-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qHLAl-0014KW-39 for linux-arm-kernel@lists.infradead.org; Thu, 06 Jul 2023 09:21:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aHurPOykK4cuq2UGfuN/i8fdcyFm0e/Xp6Py7lCIHPplG6ZfEOW8pM9a67o+3/nssk13qLPilJ9f0Q+uyazDx6/+bu5MY2+8b18lAYn6c+kRJ4bG4CPwnnUrsVMhpassHt+jbAi8DTkxoeiGPDaTUxePT2P+kt2QLDbUzOBUMNtoqF3wvUYmScRAtX/7otqqNvJdOfXFl2K5535I++R2Gi752gj73xRdZYkxkdUJFS0j2FUozZ/a/v0tzA5sY8f1hlIPjKAmEaBAikkvITABKlZlodL2eP9ttb4uNFLbwj7jfNLNIHi8RgwgEGaTjqj8GHPraKHbsNw4EsajCm0efg== 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=UUIr4//1Z0vRI5H54BK4dx7TDfrFJieljwl7yeBA7Ws=; b=fJovWI5JwgP4sHuOjZasZ1s5j1GXRc26oRQeQbFe8zbqndzbDTD9LFEjJPpbtfIWiyqFqGUqN2hMr8JHpOFghD0xcJZrHyVy/xRN+zcchD0zVeay/jVeyckyGxSjOtqd8kR3HVVWfEz1L/aD5rA0KILtQlBCUPBEp7DE7JzJ/05Ez5vh+zpAOLRPrYwf8jlExsViOUDJjiFsHQsLaGIYfMokwySx4EUpcYpgysypXvFlb6KLIOCeLwc9GPcldMR6xfUWRmI+VmxFsQS65oK7D6lmHT1a3RaT2wac8eWVt+5txRqjAwWFJp//OPuVmrmHhieM0CKTA+xz0NN+OvnCiA== 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=UUIr4//1Z0vRI5H54BK4dx7TDfrFJieljwl7yeBA7Ws=; b=nI2guFCV7bzzplMcK98sKqc9wNaBwoa8rv/qhC8OXzZbOpwGV0XH6WItMSPH4ssqeMOPUlHaeAD1uK7yObeIgT90phy4b3rf5M/tTPSJFaO9MWx8OC8PWWFcsjF0akLte+VAN2KV/XffX3qQZrVZkYHNlz+Ai69kTc2/AZRReGCKy4R6oKRu5IBVYX2OkRt9GBjXXmJd6V9YNpeN8bcpjdgvSph16bo8Pn0YmlSvqXkuF8vSyhf9SSrGRV0Hebs7uxt3vyBiuk+pO8tbeC4verIkpocxRbinG05Y90mEyT3bPU+e5wqd4lIgFgZtONddr73lYt457af/aY0njN2Amw== 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 TYZPR06MB6378.apcprd06.prod.outlook.com (2603:1096:400:419::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.37; Thu, 6 Jul 2023 09:21:05 +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.6565.016; Thu, 6 Jul 2023 09:21:05 +0000 From: Yangtao Li To: Toan Le , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Bjorn Helgaas Cc: Yangtao Li , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] PCI: xgene-msi: Use devm_platform_get_and_ioremap_resource() Date: Thu, 6 Jul 2023 17:20:46 +0800 Message-Id: <20230706092047.18599-4-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230706092047.18599-1-frank.li@vivo.com> References: <20230706092047.18599-1-frank.li@vivo.com> X-ClientProxiedBy: SI1PR02CA0035.apcprd02.prod.outlook.com (2603:1096:4:1f6::8) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB6378:EE_ X-MS-Office365-Filtering-Correlation-Id: a7ba6d09-f2b5-483d-c38c-08db7e0252e4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KHYIIh+iva2TON+M05vbQYYwoUs1M0QDJmvIOoypIn0VE7j5p6z0TkU91Mnq/KkH/clpJsTGxPaowWx8uokT/RQd4BiiH5tjp9pO11cuDTv0euRKnObF4s8q0nxvxm2lPrOiuhjybQNPgAh/p9wnD4knxPwCjWFEq8NG6+6J5QIjk1skx+12UnHLOm3cufvmBCH6Pga1zKQCrCKGK+Tl2xpZ9nhKooPk8BpjAvakpvYc4nQsbvokjHYP+kiGwUW0rvOjMo0qtcenS7Co/ld7mIG+uX37OldT4yXBilo4+NGB8zNG4H+kDl6X0tgg7BoLaZUDzw1ndcyGoO4ILGoXOvuaJZ/7u/v03NazzLPue3Fmj5QM3hV1FYs6SzB62HyVjtkGhcmU946/FkV6fOAwxtJvMMghuStw4H7ifDM/F+0/ez0mJ5MBlUcO2VUvklTmLXYq1dUR7oL8hHmFbKabhq19uJbJOMOzO9LbzkgT+/XMcvcpRGiwXDmauUDr0vG7la+SarkARpDoFjEz7TJzSrTMx4X+AUt6Mg8/yvk/ikStua+yKYB7br9gGxxiHfw7/dM7LgzO43+Rw8m1RHW3B37xC9LlEhjo/KRWL01t09gRu11Bj9McMGqjSRNIpTPo 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)(346002)(366004)(376002)(396003)(39860400002)(451199021)(1076003)(6512007)(66556008)(4326008)(66476007)(8936002)(66946007)(316002)(36756003)(5660300002)(8676002)(478600001)(2906002)(4744005)(38350700002)(110136005)(26005)(86362001)(41300700001)(6666004)(6486002)(83380400001)(6506007)(186003)(38100700002)(52116002)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wu8BNovDD0bpbEuNFXNqvrmVMGftccpikvJWvocwdFwGOKjD534Vnf5nZd6CglsMY29ScxwLYBKsg8zxrClqDMrR9wkEEoA/PwHBmXihKVTu5zBTvedQYhSeY5Xh5oUyTVJ+7rKnrIq0GbPVrv7P4/ye4uJ/61D9tf776bqoZe6/dr++t5ETm3h7Uav2AZ2m7AXvC/h9kRrwvMuOzz7g2Xscq0ngeFAs/f5QOk5mF52IDht+S90ojpXWR8Rv3TkhsupUR30WNqwtTrlieB5V9N1gIcD8FRB414/KO7gMHnvHXYrL7z+XpeMaEROqONWJXvh1bbZgBnagCLFl/GlTSIwuvqsgFur0ucfQNTqv1c8WjNpW+RBvfTY7XBmLHj12gMrRUBP/i5QIVCoZGV6ReJRrrO1Jf+HwRyAue3LYk2eBGhalDU1f4sqZ0kgYft7g752QJGby6Ig9ZD55HSGRIEzLhiaNAs4qSKPLEhS5MEE8za4EHyRmomA9mBAGsT7S/mbsaSLV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-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a7ba6d09-f2b5-483d-c38c-08db7e0252e4 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2023 09:21:05.1516 (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: x9Nl4Y6X2TllQud1S9B/edu6C5y9vIwPwbGvuB33RMeOSM/UENQNGWZHRREp5gTRkFGl+YKfBMgi+2+08inajg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6378 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_022112_018389_2EE258C2 X-CRM114-Status: GOOD ( 10.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: Yangtao Li --- drivers/pci/controller/pci-xgene-msi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/controller/pci-xgene-msi.c b/drivers/pci/controller/pci-xgene-msi.c index d7987b281f79..d7e09f264d52 100644 --- a/drivers/pci/controller/pci-xgene-msi.c +++ b/drivers/pci/controller/pci-xgene-msi.c @@ -443,8 +443,7 @@ static int xgene_msi_probe(struct platform_device *pdev) platform_set_drvdata(pdev, xgene_msi); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - xgene_msi->msi_regs = devm_ioremap_resource(&pdev->dev, res); + xgene_msi->msi_regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(xgene_msi->msi_regs)) { rc = PTR_ERR(xgene_msi->msi_regs); goto error;