From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69866C4363A for ; Fri, 30 Oct 2020 03:47:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D380E2076B for ; Fri, 30 Oct 2020 03:47:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="yQq1r5VE"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="gWWgcDUE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D380E2076B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Date:To:From: Subject:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gJLAKuOLn7MdxPTFcl4HBGgNrXAS2HyL/soCb592fLU=; b=yQq1r5VE34H4fNVT5UwlJ+nOp ypYh1JV6SrB8X01hwIMTUbW3gl7pT0X1FoVlNH0NFaPJ/74BPPY4K7/We581xSGWF9BRtvjJ7/fTP HKpZbH11oBm/+zSeKOgazMU32Oahf8WwGR50irh/Hogfnb6s+wwiw1Zob662ulNKjQRXt6I6lpBCk BGw0muTtqmFbEMwZUx7PwZdlg6Hkx1T0VBX6hD8RrQ6Kqq7TnzUH2rHzgvyX0sWfYNrEH6vWtvux5 uq7oXKWDZzDBoC3qezXNSCsLxprSCibp/ZThyTylhD/Y8Dck/LJc1ROge0DS5mYBoZIYu7GOfEjH5 pdfi3Xs3A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYLNj-0006TA-Ep; Fri, 30 Oct 2020 03:47:15 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYLNg-0006Rm-8T; Fri, 30 Oct 2020 03:47:13 +0000 X-UUID: 6597e76038074931b72a0ce5bda6483c-20201029 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=KLiLvyxExc2xjvd/BMtMmzQJRvshLItb8K0fl1F3uQs=; b=gWWgcDUEAXK+EapRqaKL3W+lVSdnxlQzDnWSW7yQq/+RvgAX5SL8KZ7siru/LWy79G/IESG/3Bc5qjij3ha5wdA7krzUY3HpEPga9k2jWpBXKr9ngw+S4AcsTLS091JoIfFTC3GkJD6elhk/pm4pBRbvAfoeT1GpTx0oxlxbo5E=; X-UUID: 6597e76038074931b72a0ce5bda6483c-20201029 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1926455247; Thu, 29 Oct 2020 19:46:59 -0800 Received: from MTKMBS33DR.mediatek.inc (172.27.6.106) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 29 Oct 2020 20:46:57 -0700 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS33DR.mediatek.inc (172.27.6.106) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 30 Oct 2020 11:46:54 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 30 Oct 2020 11:46:47 +0800 Message-ID: <1604029608.31607.10.camel@mhfsdcap03> Subject: Re: [PATCH 02/17] phy: amlogic: convert to devm_platform_ioremap_resource From: Chunfeng Yun To: Remi Pommarel Date: Fri, 30 Oct 2020 11:46:48 +0800 In-Reply-To: <20201029082415.GB15700@pilgrim> References: <1603940079-8131-1-git-send-email-chunfeng.yun@mediatek.com> <1603940079-8131-2-git-send-email-chunfeng.yun@mediatek.com> <20201029082415.GB15700@pilgrim> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: 3185889AB76AB04BA80EAB8AEBF54879DC4FCB5D585B072F7DBE2BD0F0F608DE2000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201029_234712_495916_F63F2862 X-CRM114-Status: GOOD ( 22.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , Peter Chen , Neil Armstrong , Anil Varughese , Wei Yongjun , Fabio Estevam , Jerome Brunet , Florian Fainelli , Kevin Hilman , Krzysztof Kozlowski , Kishon Vijay Abraham I , Rayagonda Kokatanur , Chen-Yu Tsai , bcm-kernel-feedback-list@broadcom.com, NXP Linux Team , Icenowy Zheng , Bharat Gooty , Martin Blumenstingl , Ray Jui , Sascha Hauer , Maxime Ripard , Yue Wang , Lubomir Rintel , Lorenzo Pieralisi , linux-mediatek@lists.infradead.org, Rikard Falkeborn , Matthias Brugger , linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Roger Quadros , Hanjie Lin , Ma Feng , Scott Branden , Randy Dunlap , Jyri Sarha , linux-kernel@vger.kernel.org, Vinod Koul , Sanket Parmar , Pengutronix Kernel Team , Joe Perches , Colin Ian King , Shawn Guo , Li Jun Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 2020-10-29 at 09:24 +0100, Remi Pommarel wrote: > Hi, > > On Thu, Oct 29, 2020 at 10:54:24AM +0800, Chunfeng Yun wrote: > > Use devm_platform_ioremap_resource to simplify code > > > > Signed-off-by: Chunfeng Yun > > --- > > drivers/phy/amlogic/phy-meson-axg-mipi-pcie-analog.c | 4 +--- > > drivers/phy/amlogic/phy-meson-axg-pcie.c | 4 +--- > > drivers/phy/amlogic/phy-meson-g12a-usb2.c | 4 +--- > > drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c | 4 +--- > > drivers/phy/amlogic/phy-meson-gxl-usb2.c | 4 +--- > > 5 files changed, 5 insertions(+), 15 deletions(-) > > > > diff --git a/drivers/phy/amlogic/phy-meson-axg-mipi-pcie-analog.c b/drivers/phy/amlogic/phy-meson-axg-mipi-pcie-analog.c > > index 1431cbf885e1..7d06cda329fb 100644 > > --- a/drivers/phy/amlogic/phy-meson-axg-mipi-pcie-analog.c > > +++ b/drivers/phy/amlogic/phy-meson-axg-mipi-pcie-analog.c > > @@ -126,7 +126,6 @@ static int phy_axg_mipi_pcie_analog_probe(struct platform_device *pdev) > > struct phy_axg_mipi_pcie_analog_priv *priv; > > struct device_node *np = dev->of_node; > > struct regmap *map; > > - struct resource *res; > > void __iomem *base; > > int ret; > > > > @@ -134,8 +133,7 @@ static int phy_axg_mipi_pcie_analog_probe(struct platform_device *pdev) > > if (!priv) > > return -ENOMEM; > > > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > > - base = devm_ioremap_resource(dev, res); > > + base = devm_platform_ioremap_resource(pdev, 0); > > if (IS_ERR(base)) { > > dev_err(dev, "failed to get regmap base\n"); > > return PTR_ERR(base); > > This patch will conflict with [0] that uses syscon to map those shared > resources instead and that is hopefully going to be merged soon. > > So I think you can skip this file. Ok, will drop it, thanks > > > diff --git a/drivers/phy/amlogic/phy-meson-axg-pcie.c b/drivers/phy/amlogic/phy-meson-axg-pcie.c > > index 377ed0dcd0d9..58a7507a8422 100644 > > --- a/drivers/phy/amlogic/phy-meson-axg-pcie.c > > +++ b/drivers/phy/amlogic/phy-meson-axg-pcie.c > > @@ -129,7 +129,6 @@ static int phy_axg_pcie_probe(struct platform_device *pdev) > > struct device *dev = &pdev->dev; > > struct phy_axg_pcie_priv *priv; > > struct device_node *np = dev->of_node; > > - struct resource *res; > > void __iomem *base; > > int ret; > > > > @@ -145,8 +144,7 @@ static int phy_axg_pcie_probe(struct platform_device *pdev) > > return ret; > > } > > > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > > - base = devm_ioremap_resource(dev, res); > > + base = devm_platform_ioremap_resource(pdev, 0); > > if (IS_ERR(base)) > > return PTR_ERR(base); > > > > diff --git a/drivers/phy/amlogic/phy-meson-g12a-usb2.c b/drivers/phy/amlogic/phy-meson-g12a-usb2.c > > index b26e30e1afaf..9d1efa0d9394 100644 > > --- a/drivers/phy/amlogic/phy-meson-g12a-usb2.c > > +++ b/drivers/phy/amlogic/phy-meson-g12a-usb2.c > > @@ -292,7 +292,6 @@ static int phy_meson_g12a_usb2_probe(struct platform_device *pdev) > > { > > struct device *dev = &pdev->dev; > > struct phy_provider *phy_provider; > > - struct resource *res; > > struct phy_meson_g12a_usb2_priv *priv; > > struct phy *phy; > > void __iomem *base; > > @@ -305,8 +304,7 @@ static int phy_meson_g12a_usb2_probe(struct platform_device *pdev) > > priv->dev = dev; > > platform_set_drvdata(pdev, priv); > > > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > > - base = devm_ioremap_resource(dev, res); > > + base = devm_platform_ioremap_resource(pdev, 0); > > if (IS_ERR(base)) > > return PTR_ERR(base); > > > > diff --git a/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c b/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c > > index 08e322789e59..ebe3d0ddd304 100644 > > --- a/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c > > +++ b/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c > > @@ -386,7 +386,6 @@ static int phy_g12a_usb3_pcie_probe(struct platform_device *pdev) > > struct device *dev = &pdev->dev; > > struct device_node *np = dev->of_node; > > struct phy_g12a_usb3_pcie_priv *priv; > > - struct resource *res; > > struct phy_provider *phy_provider; > > void __iomem *base; > > int ret; > > @@ -395,8 +394,7 @@ static int phy_g12a_usb3_pcie_probe(struct platform_device *pdev) > > if (!priv) > > return -ENOMEM; > > > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > > - base = devm_ioremap_resource(dev, res); > > + base = devm_platform_ioremap_resource(pdev, 0); > > if (IS_ERR(base)) > > return PTR_ERR(base); > > > > diff --git a/drivers/phy/amlogic/phy-meson-gxl-usb2.c b/drivers/phy/amlogic/phy-meson-gxl-usb2.c > > index 43ec9bf24abf..875afb2672c7 100644 > > --- a/drivers/phy/amlogic/phy-meson-gxl-usb2.c > > +++ b/drivers/phy/amlogic/phy-meson-gxl-usb2.c > > @@ -230,7 +230,6 @@ static int phy_meson_gxl_usb2_probe(struct platform_device *pdev) > > { > > struct device *dev = &pdev->dev; > > struct phy_provider *phy_provider; > > - struct resource *res; > > struct phy_meson_gxl_usb2_priv *priv; > > struct phy *phy; > > void __iomem *base; > > @@ -242,8 +241,7 @@ static int phy_meson_gxl_usb2_probe(struct platform_device *pdev) > > > > platform_set_drvdata(pdev, priv); > > > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > > - base = devm_ioremap_resource(dev, res); > > + base = devm_platform_ioremap_resource(pdev, 0); > > if (IS_ERR(base)) > > return PTR_ERR(base); > > > > So without the modification on phy-meson-axg-mipi-pcie-analog.c and > FWIW, > > Reviewed-by: Remi Pommarel > > Thanks, > > [0] https://patchwork.kernel.org/project/linux-amlogic/patch/20200915130339.11079-4-narmstrong@baylibre.com/ > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel