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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9132614.CDJkKcVGEf@jernej-laptop>
Date:   Tue, 11 Jul 2023 20:27:13 +0200
From:   Jernej Škrabec <jernej.skrabec@...il.com>
To:     Emilio López <emilio@...pez.com.ar>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
        Samuel Holland <samuel@...lland.org>,
        Yangtao Li <frank.li@...o.com>
Cc:     Yangtao Li <frank.li@...o.com>, linux-clk@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-sunxi@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/13] clk: sunxi: sun9i-mmc: Use
 devm_platform_get_and_ioremap_resource()

Dne sreda, 05. julij 2023 ob 08:53:01 CEST je Yangtao Li napisal(a):
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
> 
> Signed-off-by: Yangtao Li <frank.li@...o.com>

Acked-by: Jernej Skrabec <jernej.skrabec@...il.com>

Best regards,
Jernej

> ---
>  drivers/clk/sunxi/clk-sun9i-mmc.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/clk/sunxi/clk-sun9i-mmc.c
> b/drivers/clk/sunxi/clk-sun9i-mmc.c index 636bcf2439ef..0862b02b1ed4 100644
> --- a/drivers/clk/sunxi/clk-sun9i-mmc.c
> +++ b/drivers/clk/sunxi/clk-sun9i-mmc.c
> @@ -108,15 +108,13 @@ static int sun9i_a80_mmc_config_clk_probe(struct
> platform_device *pdev)
> 
>  	spin_lock_init(&data->lock);
> 
> -	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!r)
> -		return -EINVAL;
> -	/* one clock/reset pair per word */
> -	count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH);
> -	data->membase = devm_ioremap_resource(&pdev->dev, r);
> +	data->membase = devm_platform_get_and_ioremap_resource(pdev, 0, 
&r);
>  	if (IS_ERR(data->membase))
>  		return PTR_ERR(data->membase);
> 
> +	/* one clock/reset pair per word */
> +	count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH);
> +
>  	clk_data = &data->clk_data;
>  	clk_data->clk_num = count;
>  	clk_data->clks = devm_kcalloc(&pdev->dev, count, sizeof(struct clk 
*),




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ