From patchwork Wed Mar 22 02:07:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: ye.xingchen@zte.com.cn X-Patchwork-Id: 73160 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2124457wrt; Tue, 21 Mar 2023 19:38:09 -0700 (PDT) X-Google-Smtp-Source: AK7set/9ArJyjpu5MDPrPXlzZcHM7aiIzNWsmFsImPCxHG6nctskf0aeucM3OfniZHrTRRzdh5HE X-Received: by 2002:a05:6402:1508:b0:4a2:5652:d8ba with SMTP id f8-20020a056402150800b004a25652d8bamr673916edw.18.1679452689541; Tue, 21 Mar 2023 19:38:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679452689; cv=none; d=google.com; s=arc-20160816; b=fP96mEoPttLD383kduShjP1YhwyTYwuJs4WgRSXp1tOP6Nb67BoPlLcVMcOPsV4oJq ff7YXXujAzrTOqK9dKr6XNa/LkttYEuwyOyWC86fjSuJH7j7V2gWHLtclwp6s4XXdPbf pMIyuYfPaDUv5+J6+V8/d4u3u8rwLOOXCtuS+KorEYf1nvQtQv5pvg2Y/Zkqe4LHW7Zh yx79+vKChiv8ZGhLbaduarmUn9stEnKO1yLuofzMaE70TmwMC5DqBgLoKbgFvYZRZ6wi EuSJwjx+/I2uB7wi1T20G+tJ/Ukuawuin5xikYI0bszYZd7mWeG25uucozm9jsVwxyoC qlZQ== 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=UNR/MA0t/f0vEi8mcKlhWyddnZFcIZjpy49o3vAn844=; b=08gttVEoB72ECRvmw8/rT5+0fwNUwS0YNWSndB7JFkJ8S5mYlqQwivAnf9rba6+pdB Rfmt+1SQcEKqTUAxnGUTD7Ed/Dtl4gg+0Gozq8F0mr8Qh6BLnkiA2y3YfVuTKTWnP9FX 23hAfyVH3XS94hECen/dfuqKYE+L+ZTtZoYFFb8xQXoW99c2QyUinPJrwgPdDkenpHJQ 6U/Lz/cXcRxTfVjEppzIF7i96Vodvbi6TskZcvSvaa91AxQ+ecZtxTt0b6kXoQfTzuCe yZcaCg4uLiZIEjjKT4F2ryQDaTPX93e8U6FvfqI6H9+qGbfPSHQYzjfAhbZkLT1xarsQ gUaw== 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 by5-20020a0564021b0500b004fc3796b401si14462176edb.337.2023.03.21.19.37.46; Tue, 21 Mar 2023 19:38:09 -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=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229657AbjCVCHQ (ORCPT + 99 others); Tue, 21 Mar 2023 22:07:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjCVCHO (ORCPT ); Tue, 21 Mar 2023 22:07:14 -0400 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7026D43936 for ; Tue, 21 Mar 2023 19:07:13 -0700 (PDT) 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 mxct.zte.com.cn (FangMail) with ESMTPS id 4PhBgM4xLSz501bt; Wed, 22 Mar 2023 10:07:11 +0800 (CST) Received: from xaxapp02.zte.com.cn ([10.88.97.241]) by mse-fl2.zte.com.cn with SMTP id 32M273JH031716; Wed, 22 Mar 2023 10:07:04 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp02[null]) by mapi (Zmail) with MAPI id mid31; Wed, 22 Mar 2023 10:07:04 +0800 (CST) Date: Wed, 22 Mar 2023 10:07:04 +0800 (CST) X-Zmail-TransId: 2afa641a62c80ef-bb19c X-Mailer: Zmail v1.0 Message-ID: <202303221007049346627@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , Subject: =?utf-8?q?=5BPATCH=5D_phy=3A_marvell=3A_phy-mvebu-a3700-comphy=3A_u?= =?utf-8?q?se_devm=5Fplatform=5Fioremap=5Fresource=5Fbyname=28=29?= X-MAIL: mse-fl2.zte.com.cn 32M273JH031716 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 641A62CF.005/4PhBgM4xLSz501bt X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY autolearn=unavailable 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?1761033783526365760?= X-GMAIL-MSGID: =?utf-8?q?1761033783526365760?= From: Ye Xingchen Convert platform_get_resource_byname(),devm_ioremap_resource() to a single call to devm_platform_ioremap_resource_byname(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Reviewed-by: Miquel Raynal Reviewed-by: Marek BehĂșn --- drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/phy/marvell/phy-mvebu-a3700-comphy.c b/drivers/phy/marvell/phy-mvebu-a3700-comphy.c index d641b345afa3..9aeeedf59f44 100644 --- a/drivers/phy/marvell/phy-mvebu-a3700-comphy.c +++ b/drivers/phy/marvell/phy-mvebu-a3700-comphy.c @@ -1241,7 +1241,6 @@ static int mvebu_a3700_comphy_probe(struct platform_device *pdev) struct mvebu_a3700_comphy_priv *priv; struct phy_provider *provider; struct device_node *child; - struct resource *res; struct clk *clk; int ret; @@ -1251,26 +1250,19 @@ static int mvebu_a3700_comphy_probe(struct platform_device *pdev) spin_lock_init(&priv->lock); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "comphy"); - priv->comphy_regs = devm_ioremap_resource(&pdev->dev, res); + priv->comphy_regs = devm_platform_ioremap_resource_byname(pdev, "comphy"); if (IS_ERR(priv->comphy_regs)) return PTR_ERR(priv->comphy_regs); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, - "lane1_pcie_gbe"); - priv->lane1_phy_regs = devm_ioremap_resource(&pdev->dev, res); + priv->lane1_phy_regs = devm_platform_ioremap_resource_byname(pdev, "lane1_pcie_gbe"); if (IS_ERR(priv->lane1_phy_regs)) return PTR_ERR(priv->lane1_phy_regs); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, - "lane0_usb3_gbe"); - priv->lane0_phy_regs = devm_ioremap_resource(&pdev->dev, res); + priv->lane0_phy_regs = devm_platform_ioremap_resource_byname(pdev, "lane0_usb3_gbe"); if (IS_ERR(priv->lane0_phy_regs)) return PTR_ERR(priv->lane0_phy_regs); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, - "lane2_sata_usb3"); - priv->lane2_phy_indirect = devm_ioremap_resource(&pdev->dev, res); + priv->lane2_phy_indirect = devm_platform_ioremap_resource_byname(pdev, "lane2_sata_usb3"); if (IS_ERR(priv->lane2_phy_indirect)) return PTR_ERR(priv->lane2_phy_indirect);