lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201109100423.0d734ec3@xhacker.debian>
Date:   Mon, 9 Nov 2020 10:04:23 +0800
From:   Jisheng Zhang <Jisheng.Zhang@...aptics.com>
To:     Chunfeng Yun <chunfeng.yun@...iatek.com>
Cc:     Kishon Vijay Abraham I <kishon@...com>,
        Vinod Koul <vkoul@...nel.org>,
        Ondrej Jirman <megous@...ous.com>,
        Peter Chen <peter.chen@....com>,
        Neil Armstrong <narmstrong@...libre.com>,
        Anil Varughese <aniljoy@...ence.com>,
        Wei Yongjun <weiyongjun1@...wei.com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Fabio Estevam <festevam@...il.com>,
        Jerome Brunet <jbrunet@...libre.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Kevin Hilman <khilman@...libre.com>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Rayagonda Kokatanur <rayagonda.kokatanur@...adcom.com>,
        Chen-Yu Tsai <wens@...e.org>,
        bcm-kernel-feedback-list@...adcom.com,
        NXP Linux Team <linux-imx@....com>,
        Icenowy Zheng <icenowy@...c.io>,
        Bharat Gooty <bharat.gooty@...adcom.com>,
        Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
        Ray Jui <rjui@...adcom.com>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Maxime Ripard <mripard@...nel.org>,
        Yue Wang <yue.wang@...ogic.com>,
        Lubomir Rintel <lkundrak@...sk>,
        Remi Pommarel <repk@...plefau.lt>,
        linux-mediatek@...ts.infradead.org,
        Rikard Falkeborn <rikard.falkeborn@...il.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        linux-amlogic@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org,
        Roger Quadros <rogerq@...com>,
        Hanjie Lin <hanjie.lin@...ogic.com>,
        Ma Feng <mafeng.ma@...wei.com>,
        Scott Branden <sbranden@...adcom.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        Jyri Sarha <jsarha@...com>, linux-kernel@...r.kernel.org,
        Sanket Parmar <sparmar@...ence.com>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Joe Perches <joe@...ches.com>,
        Colin Ian King <colin.king@...onical.com>,
        Shawn Guo <shawnguo@...nel.org>, Li Jun <jun.li@....com>
Subject: Re: [PATCH v2 07/17] phy: marvell: convert to
 devm_platform_ioremap_resource

On Fri, 6 Nov 2020 14:08:40 +0800 Chunfeng Yun <chunfeng.yun@...iatek.com> wrote:


> 
> Use devm_platform_ioremap_resource to simplify code
> 
> Signed-off-by: Chunfeng Yun <chunfeng.yun@...iatek.com>
> ---
> v2: no changes
> ---
>  drivers/phy/marvell/phy-armada375-usb2.c | 4 +---
>  drivers/phy/marvell/phy-berlin-usb.c     | 4 +---

For phy-berlin-usb.c, 

Reviewed-by: Jisheng Zhang <Jisheng.Zhang@...aptics.com>

>  drivers/phy/marvell/phy-mmp3-usb.c       | 4 +---
>  drivers/phy/marvell/phy-mvebu-sata.c     | 4 +---
>  drivers/phy/marvell/phy-pxa-28nm-hsic.c  | 4 +---
>  drivers/phy/marvell/phy-pxa-28nm-usb2.c  | 4 +---
>  drivers/phy/marvell/phy-pxa-usb.c        | 4 +---
>  7 files changed, 7 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/phy/marvell/phy-armada375-usb2.c b/drivers/phy/marvell/phy-armada375-usb2.c
> index fa5dc9462d09..b141e3cd8a94 100644
> --- a/drivers/phy/marvell/phy-armada375-usb2.c
> +++ b/drivers/phy/marvell/phy-armada375-usb2.c
> @@ -105,15 +105,13 @@ static int armada375_usb_phy_probe(struct platform_device *pdev)
>         struct phy *phy;
>         struct phy_provider *phy_provider;
>         void __iomem *usb_cluster_base;
> -       struct resource *res;
>         struct armada375_cluster_phy *cluster_phy;
> 
>         cluster_phy = devm_kzalloc(dev, sizeof(*cluster_phy), GFP_KERNEL);
>         if (!cluster_phy)
>                 return  -ENOMEM;
> 
> -       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       usb_cluster_base = devm_ioremap_resource(&pdev->dev, res);
> +       usb_cluster_base = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(usb_cluster_base))
>                 return PTR_ERR(usb_cluster_base);
> 
> diff --git a/drivers/phy/marvell/phy-berlin-usb.c b/drivers/phy/marvell/phy-berlin-usb.c
> index a43df63007c5..78ef6ae72a9a 100644
> --- a/drivers/phy/marvell/phy-berlin-usb.c
> +++ b/drivers/phy/marvell/phy-berlin-usb.c
> @@ -165,7 +165,6 @@ static int phy_berlin_usb_probe(struct platform_device *pdev)
>         const struct of_device_id *match =
>                 of_match_device(phy_berlin_usb_of_match, &pdev->dev);
>         struct phy_berlin_usb_priv *priv;
> -       struct resource *res;
>         struct phy *phy;
>         struct phy_provider *phy_provider;
> 
> @@ -173,8 +172,7 @@ static int phy_berlin_usb_probe(struct platform_device *pdev)
>         if (!priv)
>                 return -ENOMEM;
> 
> -       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       priv->base = devm_ioremap_resource(&pdev->dev, res);
> +       priv->base = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(priv->base))
>                 return PTR_ERR(priv->base);
> 
> diff --git a/drivers/phy/marvell/phy-mmp3-usb.c b/drivers/phy/marvell/phy-mmp3-usb.c
> index 499869595a58..04c0bada3519 100644
> --- a/drivers/phy/marvell/phy-mmp3-usb.c
> +++ b/drivers/phy/marvell/phy-mmp3-usb.c
> @@ -246,7 +246,6 @@ MODULE_DEVICE_TABLE(of, mmp3_usb_phy_of_match);
>  static int mmp3_usb_phy_probe(struct platform_device *pdev)
>  {
>         struct device *dev = &pdev->dev;
> -       struct resource *resource;
>         struct mmp3_usb_phy *mmp3_usb_phy;
>         struct phy_provider *provider;
> 
> @@ -254,8 +253,7 @@ static int mmp3_usb_phy_probe(struct platform_device *pdev)
>         if (!mmp3_usb_phy)
>                 return -ENOMEM;
> 
> -       resource = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       mmp3_usb_phy->base = devm_ioremap_resource(dev, resource);
> +       mmp3_usb_phy->base = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(mmp3_usb_phy->base)) {
>                 dev_err(dev, "failed to remap PHY regs\n");
>                 return PTR_ERR(mmp3_usb_phy->base);
> diff --git a/drivers/phy/marvell/phy-mvebu-sata.c b/drivers/phy/marvell/phy-mvebu-sata.c
> index 3c01b5dceaae..51a4646e2933 100644
> --- a/drivers/phy/marvell/phy-mvebu-sata.c
> +++ b/drivers/phy/marvell/phy-mvebu-sata.c
> @@ -80,7 +80,6 @@ static const struct phy_ops phy_mvebu_sata_ops = {
>  static int phy_mvebu_sata_probe(struct platform_device *pdev)
>  {
>         struct phy_provider *phy_provider;
> -       struct resource *res;
>         struct priv *priv;
>         struct phy *phy;
> 
> @@ -88,8 +87,7 @@ static int phy_mvebu_sata_probe(struct platform_device *pdev)
>         if (!priv)
>                 return -ENOMEM;
> 
> -       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       priv->base = devm_ioremap_resource(&pdev->dev, res);
> +       priv->base = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(priv->base))
>                 return PTR_ERR(priv->base);
> 
> diff --git a/drivers/phy/marvell/phy-pxa-28nm-hsic.c b/drivers/phy/marvell/phy-pxa-28nm-hsic.c
> index 31b43d2ee39a..c5c100563f55 100644
> --- a/drivers/phy/marvell/phy-pxa-28nm-hsic.c
> +++ b/drivers/phy/marvell/phy-pxa-28nm-hsic.c
> @@ -162,7 +162,6 @@ static int mv_hsic_phy_probe(struct platform_device *pdev)
>  {
>         struct phy_provider *phy_provider;
>         struct mv_hsic_phy *mv_phy;
> -       struct resource *r;
> 
>         mv_phy = devm_kzalloc(&pdev->dev, sizeof(*mv_phy), GFP_KERNEL);
>         if (!mv_phy)
> @@ -176,8 +175,7 @@ static int mv_hsic_phy_probe(struct platform_device *pdev)
>                 return PTR_ERR(mv_phy->clk);
>         }
> 
> -       r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       mv_phy->base = devm_ioremap_resource(&pdev->dev, r);
> +       mv_phy->base = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(mv_phy->base))
>                 return PTR_ERR(mv_phy->base);
> 
> diff --git a/drivers/phy/marvell/phy-pxa-28nm-usb2.c b/drivers/phy/marvell/phy-pxa-28nm-usb2.c
> index a175ae915f02..0b390b9d2ae1 100644
> --- a/drivers/phy/marvell/phy-pxa-28nm-usb2.c
> +++ b/drivers/phy/marvell/phy-pxa-28nm-usb2.c
> @@ -294,7 +294,6 @@ static int mv_usb2_phy_probe(struct platform_device *pdev)
>  {
>         struct phy_provider *phy_provider;
>         struct mv_usb2_phy *mv_phy;
> -       struct resource *r;
> 
>         mv_phy = devm_kzalloc(&pdev->dev, sizeof(*mv_phy), GFP_KERNEL);
>         if (!mv_phy)
> @@ -308,8 +307,7 @@ static int mv_usb2_phy_probe(struct platform_device *pdev)
>                 return PTR_ERR(mv_phy->clk);
>         }
> 
> -       r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       mv_phy->base = devm_ioremap_resource(&pdev->dev, r);
> +       mv_phy->base = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(mv_phy->base))
>                 return PTR_ERR(mv_phy->base);
> 
> diff --git a/drivers/phy/marvell/phy-pxa-usb.c b/drivers/phy/marvell/phy-pxa-usb.c
> index 87ff7550b912..ffe889893ff4 100644
> --- a/drivers/phy/marvell/phy-pxa-usb.c
> +++ b/drivers/phy/marvell/phy-pxa-usb.c
> @@ -286,7 +286,6 @@ MODULE_DEVICE_TABLE(of, pxa_usb_phy_of_match);
>  static int pxa_usb_phy_probe(struct platform_device *pdev)
>  {
>         struct device *dev = &pdev->dev;
> -       struct resource *resource;
>         struct pxa_usb_phy *pxa_usb_phy;
>         struct phy_provider *provider;
>         const struct of_device_id *of_id;
> @@ -301,8 +300,7 @@ static int pxa_usb_phy_probe(struct platform_device *pdev)
>         else
>                 pxa_usb_phy->version = PXA_USB_PHY_MMP2;
> 
> -       resource = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       pxa_usb_phy->base = devm_ioremap_resource(dev, resource);
> +       pxa_usb_phy->base = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(pxa_usb_phy->base)) {
>                 dev_err(dev, "failed to remap PHY regs\n");
>                 return PTR_ERR(pxa_usb_phy->base);
> --
> 2.18.0
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@...ts.infradead.org
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ