From patchwork Wed Feb 8 02:48:03 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: 54152 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3214269wrn; Tue, 7 Feb 2023 18:52:09 -0800 (PST) X-Google-Smtp-Source: AK7set/ijXCyYYObsd1QvvpH/LJOyCgLUeAeKmTyOE4unRjPXU9dX4Fz/ttLUenvgaMmtrebyz4k X-Received: by 2002:a17:902:f355:b0:198:f0f2:81e1 with SMTP id q21-20020a170902f35500b00198f0f281e1mr4174596ple.27.1675824729586; Tue, 07 Feb 2023 18:52:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675824729; cv=none; d=google.com; s=arc-20160816; b=es952XvV1O8qyDCJ0w30lu0tVqQbTov10IyrKmcnyOn8miGvOfOAfdUe564AdRma9Z sjQCUs/BOGZ4LpgTEIC+HLDPr+lY0I9vrzwJLaxCUg4D+JqK5vj9Me8+P8JpPc/iPgWz 3P9r5yuvJVZbLQbCAfhDQI3xvnf7ZgpST3CTBBXnYXKehiupAnA4btSJfEoxwPQ3vE2L qCkZXJNqPda165dAnGsisyIiya5y7rjF4X1eIDQiDMp5FunEzlrmCPIj4BAF2bNfOTB0 aN92qQ4M54RyTl3uf8jJRDnNjoXVXq7nbpPClkwz0bnMsdQa/CuUsZN/X1aedf9B76Fq X/qQ== 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=4SICOJ4kweqN7SFlfBoMnKVIbKjyXli+Q/9caVnN0io=; b=kFRRmHrqFdoFefJyLVELcnbHpAveFTHuOCgou2YDNWKjr1gI5JJ1v/kofsJVBbrp81 V/9G6ZnRUrlGRcfR9QmbdfPUidetvJI0yW+5tgNvGK2heuIfjDjv0/5McMUto4MKbtxn NlfcNt64jxsB5zqU2vB+HdnVw9cvsqWwkiQ8+4wEExY7TdjSCmJkxfA9gg8I01pJqhyr loOATIB6/Rsr23oEWh1WMG8YIG0R1sg8lp3yCAZDKtZWcOavQCTDEO+ttrQnbfvjL5NL Gax97MHZRxsnNRULymRW+n0Hat3NfCQtR4yO0Mr/PIe/hvjl0C7mfSlAReQYWMV7V/Yh kWvA== 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 g63-20020a636b42000000b004fab19d50d7si12615593pgc.264.2023.02.07.18.51.56; Tue, 07 Feb 2023 18:52:09 -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 S230050AbjBHCsU (ORCPT + 99 others); Tue, 7 Feb 2023 21:48:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229879AbjBHCsR (ORCPT ); Tue, 7 Feb 2023 21:48:17 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86ACC26868; Tue, 7 Feb 2023 18:48:15 -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 4PBPZ56mMhz6FK2X; Wed, 8 Feb 2023 10:48:13 +0800 (CST) Received: from xaxapp03.zte.com.cn ([10.88.97.17]) by mse-fl2.zte.com.cn with SMTP id 3182m21w077937; Wed, 8 Feb 2023 10:48:02 +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:48:03 +0800 (CST) Date: Wed, 8 Feb 2023 10:48:03 +0800 (CST) X-Zmail-TransId: 2af963e30d634e00a959 X-Mailer: Zmail v1.0 Message-ID: <202302081048037733713@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , Subject: =?utf-8?b?W1BBVENIXSBNSVBTOiBwY2ktbXQ3NjIwOiBVc2XCoGRldm1fcGxhdGZv?= =?utf-8?b?cm1fZ2V0X2FuZF9pb3JlbWFwX3Jlc291cmNlKCk=?= X-MAIL: mse-fl2.zte.com.cn 3182m21w077937 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.138.novalocal with ID 63E30D6D.002 by FangMail milter! X-FangMail-Envelope: 1675824493/4PBPZ56mMhz6FK2X/63E30D6D.002/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63E30D6D.002/4PBPZ56mMhz6FK2X X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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?1757229591531017668?= X-GMAIL-MSGID: =?utf-8?q?1757229591531017668?= 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-mt7620.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/mips/pci/pci-mt7620.c b/arch/mips/pci/pci-mt7620.c index e032932348d6..2700d75d41c5 100644 --- a/arch/mips/pci/pci-mt7620.c +++ b/arch/mips/pci/pci-mt7620.c @@ -282,21 +282,17 @@ static int mt7628_pci_hw_init(struct platform_device *pdev) static int mt7620_pci_probe(struct platform_device *pdev) { - struct resource *bridge_res = platform_get_resource(pdev, - IORESOURCE_MEM, 0); - struct resource *pcie_res = platform_get_resource(pdev, - IORESOURCE_MEM, 1); u32 val = 0; rstpcie0 = devm_reset_control_get_exclusive(&pdev->dev, "pcie0"); if (IS_ERR(rstpcie0)) return PTR_ERR(rstpcie0); - bridge_base = devm_ioremap_resource(&pdev->dev, bridge_res); + bridge_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(bridge_base)) return PTR_ERR(bridge_base); - pcie_base = devm_ioremap_resource(&pdev->dev, pcie_res); + pcie_base = devm_platform_get_and_ioremap_resource(pdev, 1, NULL); if (IS_ERR(pcie_base)) return PTR_ERR(pcie_base);