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: <CANBLGcygpsp=R5gM7NeuVO-JG1yfQJ_0dhnFfL1ud=291cJZAQ@mail.gmail.com>
Date: Thu, 23 Oct 2025 05:18:16 -0700
From: Emil Renner Berthing <kernel@...il.dk>
To: Ali Tariq <alitariq45892@...il.com>, Hal Feng <hal.feng@...rfivetech.com>, 
	Bartosz Golaszewski <brgl@...ev.pl>
Cc: Linus Walleij <linus.walleij@...aro.org>, linux-gpio@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pinctrl: starfive: use dynamic GPIO base allocation

Hi Ali,

Quoting Bartosz Golaszewski (2025-10-22 09:23:37)
> On Tue, Oct 21, 2025 at 8:17 PM Ali Tariq <alitariq45892@...il.com> wrote:
> >
> > The JH7110 pinctrl driver currently sets a static GPIO base number from
> > platform data:
> >
> >   sfp->gc.base = info->gc_base;
> >
> > Static base assignment is deprecated and results in the following warning:
> >
> >   gpio gpiochip0: Static allocation of GPIO base is deprecated,
> >   use dynamic allocation.
> >
> > Set `sfp->gc.base = -1` to let the GPIO core dynamically allocate
> > the base number. This removes the warning and aligns the driver
> > with current GPIO guidelines.
> >
> > Tested on VisionFive 2 (JH7110 SoC).
> >
> > Signed-off-by: Ali Tariq <alitariq45892@...il.com>
> > ---
> >  drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c
> > index 05e3af75b09f..eb5cf8c067d1 100644
> > --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c
> > +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c
> > @@ -938,7 +938,7 @@ int jh7110_pinctrl_probe(struct platform_device *pdev)
> >         sfp->gc.set = jh7110_gpio_set;
> >         sfp->gc.set_config = jh7110_gpio_set_config;
> >         sfp->gc.add_pin_ranges = jh7110_gpio_add_pin_ranges;
> > -       sfp->gc.base = info->gc_base;
> > +       sfp->gc.base = -1;
> >         sfp->gc.ngpio = info->ngpios;
> >
> >         jh7110_irq_chip.name = sfp->gc.label;
> > --
> > 2.43.0
> >
> >
>
> That's a NACK until you also remove JH7110_AON_GC_BASE and
> JH7110_SYS_GC_BASE assignments after explaining why they are no longer
> needed.

Thanks for your patch, cleaning this up. As Bartosz said you'd want to clean up
the now unused defines and the gc_base member of struct jh7110_pinctrl_soc_info
too though.

As for why this is no longer needed, I don't think it was ever needed. It just
slipped through review unfortunately. Hal should be able to explain why if
that's not the case.

/Emil

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ