From patchwork Wed Feb 8 02:46:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ye.xingchen@zte.com.cn X-Patchwork-Id: 54154 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3214401wrn; Tue, 7 Feb 2023 18:52:33 -0800 (PST) X-Google-Smtp-Source: AK7set9lb4X9f9pm76pqL7Vx5d3OALym5QELAdqw95cRg/mxtzV0n7p1HWtElrSWFufVmQE8XgYx X-Received: by 2002:a17:902:f1ca:b0:199:2b9f:f369 with SMTP id e10-20020a170902f1ca00b001992b9ff369mr4351625plc.32.1675824753132; Tue, 07 Feb 2023 18:52:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675824753; cv=none; d=google.com; s=arc-20160816; b=dFUzaEBLi2dvCljbZETP6+YluHwi95FsA6/Y6IB79Y8Hfu45XzQ9TIsWo1fpC5dO6N uFHYnk4oM6KEotto5G/MKAfvtVCdtSrmjryj4TFMdXAcRCZy70DVxrFR1Yi09X395CR6 F3zZlMw5XKK+ijD2MP6JFKK1mkxZfUE3yzll+2v59Cc+HEcCy2bTyRaAtaEbbFhbFBmz Fdk8oItaMhp4ADgvoPTaAHj1WytocK1GAetXMrXbhzoZ/WWYxB+jdKVagWgjrOz5rAvD nEBJdURXfi6y+fj77ajcAZFqoaPYxjUv7HH3TAiIHxnrSOa92vaBmmgG7KACc2MMtfRt OxWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=FPl3t8KZDoO1Y6XIhZ+syN3Zc5bdLIK29ARcpyK+d5I=; b=iKYcAlGU9T3Ly9qbzd9cb9Bf5uWX8TpIEeXfeA1ubv1YfSmRCZMHqx/X3jLltMRzEq UM5HmoIWRzZGwksEsgcShNx/B45zl2Vbo3ckp/tqm8YYYRIK8Ie+ySv/aP+dhvGgURMx POsTr45IxtibTGSfEB9xJbpDf6bbLsO1ijdk71UXr7dZKoYvUnBEfSUjbZ2CKjqYOf7u /4nuIxV1EsktY52ATFBZJjKOA0IahsGuYlo6YsRAiF+JnHKz6PMEb+N0EowXAh248ZNh enzMc4rlqVipiduUOo3daoKuiE3mIk3EZB93cCCL68l2VngSm31wWZ32KJdMLln6QRk8 EbRg== 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=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t64-20020a638143000000b004fb25006e2fsi219239pgd.130.2023.02.07.18.52.20; Tue, 07 Feb 2023 18:52:33 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229850AbjBHCqv (ORCPT + 99 others); Tue, 7 Feb 2023 21:46:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229505AbjBHCqu (ORCPT ); Tue, 7 Feb 2023 21:46:50 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7268E2713; Tue, 7 Feb 2023 18:46:48 -0800 (PST) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4PBPXR12hkz8R039; Wed, 8 Feb 2023 10:46:47 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.99.176]) by mse-fl2.zte.com.cn with SMTP id 3182kb3A075938; Wed, 8 Feb 2023 10:46:38 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Wed, 8 Feb 2023 10:46:39 +0800 (CST) Date: Wed, 8 Feb 2023 10:46:39 +0800 (CST) X-Zmail-TransId: 2af963e30d0fffffffff83c06cb9 X-Mailer: Zmail v1.0 Message-ID: <202302081046390773649@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , Subject: =?utf-8?b?W1BBVENIXSBNSVBTOiBwY2k6IGxhbnRpcTogVXNlwqBkZXZtX3BsYXRm?= =?utf-8?b?b3JtX2dldF9hbmRfaW9yZW1hcF9yZXNvdXJjZSgp?= X-MAIL: mse-fl2.zte.com.cn 3182kb3A075938 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.137.novalocal with ID 63E30D17.001 by FangMail milter! X-FangMail-Envelope: 1675824407/4PBPXR12hkz8R039/63E30D17.001/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63E30D17.001/4PBPXR12hkz8R039 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY 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?1757229616254993969?= X-GMAIL-MSGID: =?utf-8?q?1757229616254993969?= From: Ye Xingchen 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: Ye Xingchen --- arch/mips/pci/pci-lantiq.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c index 8d16cd021f60..d967e4c0cf24 100644 --- a/arch/mips/pci/pci-lantiq.c +++ b/arch/mips/pci/pci-lantiq.c @@ -204,17 +204,13 @@ static int ltq_pci_startup(struct platform_device *pdev) static int ltq_pci_probe(struct platform_device *pdev) { - struct resource *res_cfg, *res_bridge; - pci_clear_flags(PCI_PROBE_ONLY); - res_bridge = platform_get_resource(pdev, IORESOURCE_MEM, 1); - ltq_pci_membase = devm_ioremap_resource(&pdev->dev, res_bridge); + ltq_pci_membase = devm_platform_get_and_ioremap_resource(pdev, 1, NULL); if (IS_ERR(ltq_pci_membase)) return PTR_ERR(ltq_pci_membase); - res_cfg = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ltq_pci_mapped_cfg = devm_ioremap_resource(&pdev->dev, res_cfg); + ltq_pci_mapped_cfg = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(ltq_pci_mapped_cfg)) return PTR_ERR(ltq_pci_mapped_cfg);