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: <02ece950-b3d2-0d1a-fd94-acb64272bc96@samsung.com>
Date:   Tue, 10 Dec 2019 11:10:39 +0900
From:   Chanwoo Choi <cw00.choi@...sung.com>
To:     Yangtao Li <tiny.windzz@...il.com>, afaerber@...e.de,
        manivannan.sadhasivam@...aro.org, mturquette@...libre.com,
        sboyd@...nel.org, Eugeniy.Paltsev@...opsys.com,
        shawnguo@...nel.org, s.hauer@...gutronix.de, kernel@...gutronix.de,
        festevam@...il.com, linux-imx@....com, agross@...nel.org,
        s.nawrocki@...sung.com, tomasz.figa@...il.com, kgene@...nel.org,
        krzk@...nel.org, palmer@...ive.com, paul.walmsley@...ive.com,
        dinguyen@...nel.org, mripard@...nel.org, wens@...e.org,
        emilio@...pez.com.ar, pdeschrijver@...dia.com, pgaikwad@...dia.com,
        thierry.reding@...il.com, jonathanh@...dia.com,
        matthias.bgg@...il.com, rfontana@...hat.com,
        gregkh@...uxfoundation.org, t-kristo@...com, john@...ozen.org,
        tglx@...utronix.de, allison@...utok.net,
        kstewart@...uxfoundation.org, swinslow@...il.com,
        aisheng.dong@....com, robh@...nel.org, daniel.baluta@....com,
        wangyan.wang@...iatek.com, chunhui.dai@...iatek.com,
        miquel.raynal@...tlin.com, heiko@...ech.de, jcmvbkbc@...il.com,
        nsekhar@...com, geert+renesas@...der.be
Cc:     linux-arm-kernel@...ts.infradead.org, linux-clk@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        linux-samsung-soc@...r.kernel.org, linux-riscv@...ts.infradead.org,
        linux-tegra@...r.kernel.org, linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH 03/17] clk: samsung: convert to
 devm_platform_ioremap_resource

Hi,

On 12/10/19 4:57 AM, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@...il.com>
> ---
>  drivers/clk/samsung/clk-exynos-audss.c   | 4 +---
>  drivers/clk/samsung/clk-exynos4412-isp.c | 4 +---
>  drivers/clk/samsung/clk-exynos5433.c     | 4 +---
>  drivers/clk/samsung/clk-s5pv210-audss.c  | 4 +---
>  4 files changed, 4 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung/clk-exynos-audss.c
> index 42b5d32c6cc7..9cc127a162ad 100644
> --- a/drivers/clk/samsung/clk-exynos-audss.c
> +++ b/drivers/clk/samsung/clk-exynos-audss.c
> @@ -129,7 +129,6 @@ static int exynos_audss_clk_probe(struct platform_device *pdev)
>  	struct clk *pll_ref, *pll_in, *cdclk, *sclk_audio, *sclk_pcm_in;
>  	const struct exynos_audss_clk_drvdata *variant;
>  	struct clk_hw **clk_table;
> -	struct resource *res;
>  	struct device *dev = &pdev->dev;
>  	int i, ret = 0;
>  
> @@ -137,8 +136,7 @@ static int exynos_audss_clk_probe(struct platform_device *pdev)
>  	if (!variant)
>  		return -EINVAL;
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	reg_base = devm_ioremap_resource(dev, res);
> +	reg_base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(reg_base))
>  		return PTR_ERR(reg_base);
>  
> diff --git a/drivers/clk/samsung/clk-exynos4412-isp.c b/drivers/clk/samsung/clk-exynos4412-isp.c
> index 4b9e73608c21..20f5129f7212 100644
> --- a/drivers/clk/samsung/clk-exynos4412-isp.c
> +++ b/drivers/clk/samsung/clk-exynos4412-isp.c
> @@ -110,11 +110,9 @@ static int __init exynos4x12_isp_clk_probe(struct platform_device *pdev)
>  	struct samsung_clk_provider *ctx;
>  	struct device *dev = &pdev->dev;
>  	struct device_node *np = dev->of_node;
> -	struct resource *res;
>  	void __iomem *reg_base;
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	reg_base = devm_ioremap_resource(dev, res);
> +	reg_base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(reg_base)) {
>  		dev_err(dev, "failed to map registers\n");
>  		return PTR_ERR(reg_base);
> diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c
> index 4b1aa9382ad2..b0d48cddfd6e 100644
> --- a/drivers/clk/samsung/clk-exynos5433.c
> +++ b/drivers/clk/samsung/clk-exynos5433.c
> @@ -5557,7 +5557,6 @@ static int __init exynos5433_cmu_probe(struct platform_device *pdev)
>  	struct exynos5433_cmu_data *data;
>  	struct samsung_clk_provider *ctx;
>  	struct device *dev = &pdev->dev;
> -	struct resource *res;
>  	void __iomem *reg_base;
>  	int i;
>  
> @@ -5570,8 +5569,7 @@ static int __init exynos5433_cmu_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  	ctx = &data->ctx;
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	reg_base = devm_ioremap_resource(dev, res);
> +	reg_base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(reg_base))
>  		return PTR_ERR(reg_base);
>  
> diff --git a/drivers/clk/samsung/clk-s5pv210-audss.c b/drivers/clk/samsung/clk-s5pv210-audss.c
> index 14985ebd043b..503bd8a10d8f 100644
> --- a/drivers/clk/samsung/clk-s5pv210-audss.c
> +++ b/drivers/clk/samsung/clk-s5pv210-audss.c
> @@ -63,15 +63,13 @@ static struct syscore_ops s5pv210_audss_clk_syscore_ops = {
>  static int s5pv210_audss_clk_probe(struct platform_device *pdev)
>  {
>  	int i, ret = 0;
> -	struct resource *res;
>  	const char *mout_audss_p[2];
>  	const char *mout_i2s_p[3];
>  	const char *hclk_p;
>  	struct clk_hw **clk_table;
>  	struct clk *hclk, *pll_ref, *pll_in, *cdclk, *sclk_audio;
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	reg_base = devm_ioremap_resource(&pdev->dev, res);
> +	reg_base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(reg_base)) {
>  		dev_err(&pdev->dev, "failed to map audss registers\n");
>  		return PTR_ERR(reg_base);
> 

Acked-by: Chanwoo Choi <cw00.choi@...sung.com>


-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ