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]
Date: Tue, 25 Jun 2024 16:16:01 +0200
From: Jonas Gorski <jonas.gorski@...il.com>
To: Shiji Yang <yangshiji66@...look.com>
Cc: linux-gpio@...r.kernel.org, Alban Bedel <albeu@...e.fr>, 
	Linus Walleij <linus.walleij@...aro.org>, Bartosz Golaszewski <brgl@...ev.pl>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gpio: ath79: convert to dynamic GPIO base allocation

Hi,

On Tue, 25 Jun 2024 at 03:09, Shiji Yang <yangshiji66@...look.com> wrote:
>
> ath79 target has already been converted to device tree based
> platform. Using dynamic GPIO numberspace base to suppress the
> warning:
>
> gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
>
> Tested on Atheros AR7241 and AR9344.
>
> Signed-off-by: Shiji Yang <yangshiji66@...look.com>
> ---
>  drivers/gpio/gpio-ath79.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpio/gpio-ath79.c b/drivers/gpio/gpio-ath79.c
> index f0c0c0f77eb0..d986424a661e 100644
> --- a/drivers/gpio/gpio-ath79.c
> +++ b/drivers/gpio/gpio-ath79.c
> @@ -273,8 +273,8 @@ static int ath79_gpio_probe(struct platform_device *pdev)
>                 dev_err(dev, "bgpio_init failed\n");
>                 return err;
>         }
> -       /* Use base 0 to stay compatible with legacy platforms */
> -       ctrl->gc.base = 0;
> +       /* Dynamic allocation */
> +       ctrl->gc.base = -1;

bgpip_init() will already have set gc.base to -1, so you can just drop
the assignment.

Best Regards,
Jonas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ