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] [day] [month] [year] [list]
Message-ID: <20230713102244.GO10768@google.com>
Date:   Thu, 13 Jul 2023 11:22:44 +0100
From:   Lee Jones <lee@...nel.org>
To:     Yangtao Li <frank.li@...o.com>
Cc:     Pavel Machek <pavel@....cz>, linux-leds@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] leds: ip30: Convert to devm_platform_ioremap_resource()

On Tue, 04 Jul 2023, Yangtao Li wrote:

> Use devm_platform_ioremap_resource() to simplify code.
> 
> Signed-off-by: Yangtao Li <frank.li@...o.com>
> ---
>  drivers/leds/leds-ip30.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/leds/leds-ip30.c b/drivers/leds/leds-ip30.c
> index 1f952bad0fe8..2df24c303366 100644
> --- a/drivers/leds/leds-ip30.c
> +++ b/drivers/leds/leds-ip30.c
> @@ -27,22 +27,16 @@ static void ip30led_set(struct led_classdev *led_cdev,
>  
>  static int ip30led_create(struct platform_device *pdev, int num)
>  {
> -	struct resource *res;
>  	struct ip30_led *data;
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, num);
> -	if (!res)
> -		return -EBUSY;
> -
>  	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
>  	if (!data)
>  		return -ENOMEM;
>  
> -	data->reg = devm_ioremap_resource(&pdev->dev, res);
> +	data->reg = devm_platform_ioremap_resource(pdev, num);
>  	if (IS_ERR(data->reg))
>  		return PTR_ERR(data->reg);
>  
> -

You're not supposed to do that.  Separate patch in future please.

But I cannot review what I do not see!

Applied, thanks

-- 
Lee Jones [李琼斯]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ