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>] [day] [month] [year] [list]
Message-ID: <20201029165029.GA84818@kozik-lap>
Date:   Thu, 29 Oct 2020 17:50:29 +0100
From:   Krzysztof Kozlowski <krzk@...nel.org>
To:     Chunfeng Yun <chunfeng.yun@...iatek.com>
Cc:     Kishon Vijay Abraham I <kishon@...com>,
        Vinod Koul <vkoul@...nel.org>,
        Maxime Ripard <mripard@...nel.org>,
        Chen-Yu Tsai <wens@...e.org>,
        Kevin Hilman <khilman@...libre.com>,
        Neil Armstrong <narmstrong@...libre.com>,
        Jerome Brunet <jbrunet@...libre.com>,
        Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
        Ray Jui <rjui@...adcom.com>,
        Scott Branden <sbranden@...adcom.com>,
        bcm-kernel-feedback-list@...adcom.com,
        Florian Fainelli <f.fainelli@...il.com>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        Lubomir Rintel <lkundrak@...sk>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        Colin Ian King <colin.king@...onical.com>,
        Ondrej Jirman <megous@...ous.com>,
        Rikard Falkeborn <rikard.falkeborn@...il.com>,
        Icenowy Zheng <icenowy@...c.io>,
        Remi Pommarel <repk@...plefau.lt>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Yue Wang <yue.wang@...ogic.com>,
        Hanjie Lin <hanjie.lin@...ogic.com>,
        Joe Perches <joe@...ches.com>,
        Bharat Gooty <bharat.gooty@...adcom.com>,
        Rayagonda Kokatanur <rayagonda.kokatanur@...adcom.com>,
        Peter Chen <peter.chen@....com>, Roger Quadros <rogerq@...com>,
        Jyri Sarha <jsarha@...com>,
        Sanket Parmar <sparmar@...ence.com>,
        Anil Varughese <aniljoy@...ence.com>, Li Jun <jun.li@....com>,
        Ma Feng <mafeng.ma@...wei.com>,
        Wei Yongjun <weiyongjun1@...wei.com>,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-amlogic@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH 14/17] phy: samsung: convert to
 devm_platform_ioremap_resource

On Thu, Oct 29, 2020 at 10:54:36AM +0800, Chunfeng Yun wrote:
> Use devm_platform_ioremap_resource to simplify code
> 
> Signed-off-by: Chunfeng Yun <chunfeng.yun@...iatek.com>
> ---

Reviewed-by: Krzysztof Kozlowski <krzk@...nel.org>

Best regards,
Krzysztof

>  drivers/phy/samsung/phy-exynos-pcie.c     | 7 ++-----
>  drivers/phy/samsung/phy-exynos5-usbdrd.c  | 4 +---
>  drivers/phy/samsung/phy-exynos5250-sata.c | 5 +----
>  drivers/phy/samsung/phy-samsung-usb2.c    | 4 +---
>  4 files changed, 5 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/phy/samsung/phy-exynos-pcie.c b/drivers/phy/samsung/phy-exynos-pcie.c
> index 7e28b1aea0d1..c98fff5c1ac8 100644
> --- a/drivers/phy/samsung/phy-exynos-pcie.c
> +++ b/drivers/phy/samsung/phy-exynos-pcie.c
> @@ -232,7 +232,6 @@ static int exynos_pcie_phy_probe(struct platform_device *pdev)
>  	struct exynos_pcie_phy *exynos_phy;
>  	struct phy *generic_phy;
>  	struct phy_provider *phy_provider;
> -	struct resource *res;
>  	const struct exynos_pcie_phy_data *drv_data;
>  
>  	drv_data = of_device_get_match_data(dev);
> @@ -243,13 +242,11 @@ static int exynos_pcie_phy_probe(struct platform_device *pdev)
>  	if (!exynos_phy)
>  		return -ENOMEM;
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	exynos_phy->phy_base = devm_ioremap_resource(dev, res);
> +	exynos_phy->phy_base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(exynos_phy->phy_base))
>  		return PTR_ERR(exynos_phy->phy_base);
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> -	exynos_phy->blk_base = devm_ioremap_resource(dev, res);
> +	exynos_phy->blk_base = devm_platform_ioremap_resource(pdev, 1);
>  	if (IS_ERR(exynos_phy->blk_base))
>  		return PTR_ERR(exynos_phy->blk_base);
>  
> diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c
> index cfa9b8b7e5ac..ee0848fe8432 100644
> --- a/drivers/phy/samsung/phy-exynos5-usbdrd.c
> +++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c
> @@ -829,7 +829,6 @@ static int exynos5_usbdrd_phy_probe(struct platform_device *pdev)
>  	struct device_node *node = dev->of_node;
>  	struct exynos5_usbdrd_phy *phy_drd;
>  	struct phy_provider *phy_provider;
> -	struct resource *res;
>  	const struct exynos5_usbdrd_phy_drvdata *drv_data;
>  	struct regmap *reg_pmu;
>  	u32 pmu_offset;
> @@ -843,8 +842,7 @@ static int exynos5_usbdrd_phy_probe(struct platform_device *pdev)
>  	dev_set_drvdata(dev, phy_drd);
>  	phy_drd->dev = dev;
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	phy_drd->reg_phy = devm_ioremap_resource(dev, res);
> +	phy_drd->reg_phy = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(phy_drd->reg_phy))
>  		return PTR_ERR(phy_drd->reg_phy);
>  
> diff --git a/drivers/phy/samsung/phy-exynos5250-sata.c b/drivers/phy/samsung/phy-exynos5250-sata.c
> index 4dd7324d91b2..9ec234243f7c 100644
> --- a/drivers/phy/samsung/phy-exynos5250-sata.c
> +++ b/drivers/phy/samsung/phy-exynos5250-sata.c
> @@ -162,7 +162,6 @@ static int exynos_sata_phy_probe(struct platform_device *pdev)
>  {
>  	struct exynos_sata_phy *sata_phy;
>  	struct device *dev = &pdev->dev;
> -	struct resource *res;
>  	struct phy_provider *phy_provider;
>  	struct device_node *node;
>  	int ret = 0;
> @@ -171,9 +170,7 @@ static int exynos_sata_phy_probe(struct platform_device *pdev)
>  	if (!sata_phy)
>  		return -ENOMEM;
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -
> -	sata_phy->regs = devm_ioremap_resource(dev, res);
> +	sata_phy->regs = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(sata_phy->regs))
>  		return PTR_ERR(sata_phy->regs);
>  
> diff --git a/drivers/phy/samsung/phy-samsung-usb2.c b/drivers/phy/samsung/phy-samsung-usb2.c
> index a3ed3ff04690..f79f605cff79 100644
> --- a/drivers/phy/samsung/phy-samsung-usb2.c
> +++ b/drivers/phy/samsung/phy-samsung-usb2.c
> @@ -143,7 +143,6 @@ static int samsung_usb2_phy_probe(struct platform_device *pdev)
>  	const struct samsung_usb2_phy_config *cfg;
>  	struct device *dev = &pdev->dev;
>  	struct phy_provider *phy_provider;
> -	struct resource *mem;
>  	struct samsung_usb2_phy_driver *drv;
>  	int i, ret;
>  
> @@ -167,8 +166,7 @@ static int samsung_usb2_phy_probe(struct platform_device *pdev)
>  	drv->cfg = cfg;
>  	drv->dev = dev;
>  
> -	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	drv->reg_phy = devm_ioremap_resource(dev, mem);
> +	drv->reg_phy = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(drv->reg_phy)) {
>  		dev_err(dev, "Failed to map register memory (phy)\n");
>  		return PTR_ERR(drv->reg_phy);
> -- 
> 2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ