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: <YxykV6GiYH79gg+X@sol>
Date:   Sat, 10 Sep 2022 22:51:03 +0800
From:   Kent Gibson <warthog618@...il.com>
To:     Bartosz Golaszewski <brgl@...ev.pl>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] gpiolib: un-inline gpiod_request_user()

On Fri, Sep 09, 2022 at 02:13:28PM +0200, Bartosz Golaszewski wrote:
> Pull this bit of code into gpiolib.c as we're soon be calling certain
> symbols static in this compilation unit.
> 

Nit: "we'll soon be calling certain static symbols"

> Signed-off-by: Bartosz Golaszewski <brgl@...ev.pl>
> ---
>  drivers/gpio/gpiolib.c | 11 +++++++++++
>  drivers/gpio/gpiolib.h | 12 +-----------
>  2 files changed, 12 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index cc9c0a12259e..6768734b9e15 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -2009,6 +2009,17 @@ int gpiod_request(struct gpio_desc *desc, const char *label)
>  	return ret;
>  }
>  
> +int gpiod_request_user(struct gpio_desc *desc, const char *label)
> +{
> +	int ret;
> +
> +	ret = gpiod_request(desc, label);
> +	if (ret == -EPROBE_DEFER)
> +		ret = -ENODEV;
> +
> +	return ret;
> +}
> +
>  static bool gpiod_free_commit(struct gpio_desc *desc)
>  {
>  	bool			ret = false;
> diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h
> index d900ecdbac46..b35deb08a7f5 100644
> --- a/drivers/gpio/gpiolib.h
> +++ b/drivers/gpio/gpiolib.h
> @@ -179,19 +179,9 @@ struct gpio_desc {
>  #define gpiod_not_found(desc)		(IS_ERR(desc) && PTR_ERR(desc) == -ENOENT)
>  
>  int gpiod_request(struct gpio_desc *desc, const char *label);
> +int gpiod_request_user(struct gpio_desc *desc, const char *label);
>  void gpiod_free(struct gpio_desc *desc);
>  
> -static inline int gpiod_request_user(struct gpio_desc *desc, const char *label)
> -{
> -	int ret;
> -
> -	ret = gpiod_request(desc, label);
> -	if (ret == -EPROBE_DEFER)
> -		ret = -ENODEV;
> -
> -	return ret;
> -}
> -
>  int gpiod_configure_flags(struct gpio_desc *desc, const char *con_id,
>  		unsigned long lflags, enum gpiod_flags dflags);
>  int gpio_set_debounce_timeout(struct gpio_desc *desc, unsigned int debounce);
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ