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]
Date: Mon, 13 May 2024 12:02:00 +0200
From: Laura Nao <laura.nao@...labora.com>
To: andriy.shevchenko@...ux.intel.com
Cc: bot@...nelci.org,
	brgl@...ev.pl,
	kernel@...labora.com,
	laura.nao@...labora.com,
	linus.walleij@...aro.org,
	linux-acpi@...r.kernel.org,
	linux-gpio@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	mika.westerberg@...ux.intel.com
Subject: Re: [PATCH] gpiolib: acpi: Add ACPI device NULL check to

Hi Andy,

On 5/10/24 16:46, Andy Shevchenko wrote:
> 
> Now we may remove that check from __acpi_find_gpio():
> 
> --- a/drivers/gpio/gpiolib-acpi.c
> +++ b/drivers/gpio/gpiolib-acpi.c
> @@ -988,10 +988,10 @@ __acpi_find_gpio(struct fwnode_handle *fwnode,
> const char *con_id, unsigned int
>   	}
>   
>   	/* Then from plain _CRS GPIOs */
> -	if (!adev || !can_fallback)
> -		return ERR_PTR(-ENOENT);
> +	if (can_fallback)
> +		return acpi_get_gpiod_by_index(adev, NULL, idx, info);
>   
> -	return acpi_get_gpiod_by_index(adev, NULL, idx, info);
> +	return ERR_PTR(-ENOENT);
>   }
>   
>   struct gpio_desc *acpi_find_gpio(struct fwnode_handle *fwnode,
> 
> 
> As a side effect it will make the comment better to understand.
> 
> With above suggestion applied, feel free to add mine
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> 
> You might need to rephrase the commit message to say that
> 
>   "We also move the check in additional to the moving the function
>   call
>   outside of __acpi_find_gpio()."
> 
> or something similar, up to you.
> 

Thanks for the feedback, I sent another patch with the suggestions above
applied:
https://lore.kernel.org/all/20240513095610.216668-1-laura.nao@collabora.com/T/#u

Best regards,

Laura Nao


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ