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: <CAMRc=McnSbPOTAUMSx6iH_0VAsX0yteofgAyvxQB5sUcV5ni8w@mail.gmail.com>
Date: Fri, 12 Apr 2024 21:37:49 +0200
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Michael Walle <mwalle@...nel.org>, Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH v1 1/1] gpio: regmap: Use -ENOTSUPP consistently

On Wed, Apr 10, 2024 at 8:39 AM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
>
> The GPIO library expects the drivers to return -ENOTSUPP in some cases
> and not using analogue POSIX code. Make the driver to follow this.
>
> Signed-off-by: Andy Shevchenko <andy.shevchenko@...il.com>
> ---
>  drivers/gpio/gpio-regmap.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpio/gpio-regmap.c b/drivers/gpio/gpio-regmap.c
> index c08c8e528867e..71684dee2ca5d 100644
> --- a/drivers/gpio/gpio-regmap.c
> +++ b/drivers/gpio/gpio-regmap.c
> @@ -129,7 +129,7 @@ static int gpio_regmap_get_direction(struct gpio_chip *chip,
>                 base = gpio_regmap_addr(gpio->reg_dir_in_base);
>                 invert = 1;
>         } else {
> -               return -EOPNOTSUPP;
> +               return -ENOTSUPP;
>         }
>
>         ret = gpio->reg_mask_xlate(gpio, base, offset, &reg, &mask);
> @@ -160,7 +160,7 @@ static int gpio_regmap_set_direction(struct gpio_chip *chip,
>                 base = gpio_regmap_addr(gpio->reg_dir_in_base);
>                 invert = 1;
>         } else {
> -               return -EOPNOTSUPP;
> +               return -ENOTSUPP;
>         }
>
>         ret = gpio->reg_mask_xlate(gpio, base, offset, &reg, &mask);
> --
> 2.44.0
>

Applied, thanks!

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ