From: Remi Pommarel <repk@triplefau.lt>
To: Chunfeng Yun <chunfeng.yun@mediatek.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
Vinod Koul <vkoul@kernel.org>, Maxime Ripard <mripard@kernel.org>,
Chen-Yu Tsai <wens@csie.org>, Kevin Hilman <khilman@baylibre.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
bcm-kernel-feedback-list@broadcom.com,
Florian Fainelli <f.fainelli@gmail.com>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
Lubomir Rintel <lkundrak@v3.sk>,
Matthias Brugger <matthias.bgg@gmail.com>,
Randy Dunlap <rdunlap@infradead.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Colin Ian King <colin.king@canonical.com>,
Ondrej Jirman <megous@megous.com>,
Rikard Falkeborn <rikard.falkeborn@gmail.com>,
Icenowy Zheng <icenowy@aosc.io>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Yue Wang <yue.wang@amlogic.com>,
Hanjie Lin <hanjie.lin@amlogic.com>,
Joe Perches <joe@perches.com>,
Bharat Gooty <bharat.gooty@broadcom.com>,
Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>,
Peter Chen <peter.chen@nxp.com>, Roger Quadros <rogerq@ti.com>,
Jyri Sarha <jsarha@ti.com>, Sanket Parmar <sparmar@cadence.com>,
Anil Varughese <aniljoy@cadence.com>, Li Jun <jun.li@nxp.com>,
Ma Feng <mafeng.ma@huawei.com>,
Wei Yongjun <weiyongjun1@huawei.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH 02/17] phy: amlogic: convert to devm_platform_ioremap_resource
Date: Thu, 29 Oct 2020 09:24:15 +0100 [thread overview]
Message-ID: <20201029082415.GB15700@pilgrim> (raw)
In-Reply-To: <1603940079-8131-2-git-send-email-chunfeng.yun@mediatek.com>
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 <chunfeng.yun@mediatek.com>
> ---
> 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.
> 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 <repk@triplefau.lt>
Thanks,
[0] https://patchwork.kernel.org/project/linux-amlogic/patch/20200915130339.11079-4-narmstrong@baylibre.com/
--
Remi
next parent reply other threads:[~2020-10-29 8:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1603940079-8131-1-git-send-email-chunfeng.yun@mediatek.com>
[not found] ` <1603940079-8131-2-git-send-email-chunfeng.yun@mediatek.com>
2020-10-29 8:24 ` Remi Pommarel [this message]
2020-10-30 3:46 ` [PATCH 02/17] phy: amlogic: convert to devm_platform_ioremap_resource Chunfeng Yun
[not found] ` <1603940079-8131-15-git-send-email-chunfeng.yun@mediatek.com>
2020-10-29 10:20 ` [PATCH 15/17] phy: phy-stm32-usbphyc: " Amelie DELAUNAY
[not found] ` <1603940079-8131-4-git-send-email-chunfeng.yun@mediatek.com>
2020-10-29 10:50 ` [PATCH 04/17] phy: cadence: " Peter Chen
[not found] ` <1603940079-8131-5-git-send-email-chunfeng.yun@mediatek.com>
2020-10-29 10:51 ` [PATCH 05/17] phy: freescale: " Peter Chen
[not found] ` <1603940079-8131-14-git-send-email-chunfeng.yun@mediatek.com>
2020-10-29 16:50 ` [PATCH 14/17] phy: samsung: " Krzysztof Kozlowski
[not found] ` <1603940079-8131-3-git-send-email-chunfeng.yun@mediatek.com>
2020-10-30 3:49 ` [PATCH 03/17] phy: broadcom: convert to devm_platform_ioremap_resource(_byname) Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201029082415.GB15700@pilgrim \
--to=repk@triplefau.lt \
--cc=aniljoy@cadence.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bharat.gooty@broadcom.com \
--cc=chunfeng.yun@mediatek.com \
--cc=colin.king@canonical.com \
--cc=f.fainelli@gmail.com \
--cc=festevam@gmail.com \
--cc=hanjie.lin@amlogic.com \
--cc=icenowy@aosc.io \
--cc=jbrunet@baylibre.com \
--cc=joe@perches.com \
--cc=jsarha@ti.com \
--cc=jun.li@nxp.com \
--cc=kernel@pengutronix.de \
--cc=khilman@baylibre.com \
--cc=kishon@ti.com \
--cc=krzk@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=lkundrak@v3.sk \
--cc=lorenzo.pieralisi@arm.com \
--cc=mafeng.ma@huawei.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=matthias.bgg@gmail.com \
--cc=megous@megous.com \
--cc=mripard@kernel.org \
--cc=narmstrong@baylibre.com \
--cc=peter.chen@nxp.com \
--cc=rayagonda.kokatanur@broadcom.com \
--cc=rdunlap@infradead.org \
--cc=rikard.falkeborn@gmail.com \
--cc=rjui@broadcom.com \
--cc=rogerq@ti.com \
--cc=s.hauer@pengutronix.de \
--cc=sbranden@broadcom.com \
--cc=shawnguo@kernel.org \
--cc=sparmar@cadence.com \
--cc=vkoul@kernel.org \
--cc=weiyongjun1@huawei.com \
--cc=wens@csie.org \
--cc=yue.wang@amlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox