Re: [PATCH net-next v5 09/12] net: pse-pd: pd692x0: Add support for controller and manager power supplies

Russell King (Oracle)
2025-02-24T12:49:51Z

On Mon, Feb 24, 2025 at 01:42:22PM +0100, Maxime Chevallier wrote:
> On Tue, 18 Feb 2025 17:19:13 +0100
> Kory Maincent <kory.maincent@bootlin.com> wrote:
> > diff --git a/drivers/net/pse-pd/pd692x0.c b/drivers/net/pse-pd/pd692x0.c
> > index 44ded2aa6fca..c9fa60b314ce 100644
> > --- a/drivers/net/pse-pd/pd692x0.c
> > +++ b/drivers/net/pse-pd/pd692x0.c
> > @@ -976,8 +976,10 @@ pd692x0_register_managers_regulator(struct pd692x0_priv *priv,
> > reg_name_len = strlen(dev_name(dev)) + 23;
> >
> > for (i = 0; i < nmanagers; i++) {
> > + static const char * const regulators[] = { "vaux5", "vaux3p3" };
>
> Looks like the 'static' is not needed here :)

Have you checked the compiler output before saying that?

I've seen plenty of instances where "static" should be there but isn't,
leading to the compiler generating inline code to create the
array/struct on the stack.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!