[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJq09z6+jDquvS2he5PBJmDOgYGXwgf_jG9BXowEcEK_U5fMTA@mail.gmail.com>
Date: Mon, 29 Jan 2024 14:36:23 -0300
From: Luiz Angelo Daros de Luca <luizluca@...il.com>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: netdev@...r.kernel.org, linus.walleij@...aro.org, alsi@...g-olufsen.dk,
andrew@...n.ch, olteanv@...il.com, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, arinc.unal@...nc9.com,
ansuelsmth@...il.com
Subject: Re: [PATCH net-next v4 04/11] net: dsa: realtek: keep variant
reference in realtek_priv
> On 1/23/2024 1:55 PM, Luiz Angelo Daros de Luca wrote:
> > Instead of copying values from the variant, we can keep a reference in
> > realtek_priv.
> >
> > This is a preliminary change for sharing code betwen interfaces. It will
> > allow to move most of the probe into a common module while still allow
> > code specific to each interface to read variant fields.
> >
> > Signed-off-by: Luiz Angelo Daros de Luca <luizluca@...il.com>
> > ---
>
> [snip]
>
> > diff --git a/drivers/net/dsa/realtek/realtek.h b/drivers/net/dsa/realtek/realtek.h
> > index e9ee778665b2..0c51b5132c61 100644
> > --- a/drivers/net/dsa/realtek/realtek.h
> > +++ b/drivers/net/dsa/realtek/realtek.h
> > @@ -58,9 +58,6 @@ struct realtek_priv {
> > struct mii_bus *bus;
> > int mdio_addr;
> >
> > - unsigned int clk_delay;
> > - u8 cmd_read;
> > - u8 cmd_write;
> > spinlock_t lock; /* Locks around command writes */
> > struct dsa_switch *ds;
> > struct irq_domain *irqdomain;
> > @@ -79,6 +76,8 @@ struct realtek_priv {
> > int vlan_enabled;
> > int vlan4k_enabled;
> >
> > + const struct realtek_variant *variant;
>
> This is not probably performance sensitive but should the variant
> pointer be moved where clk_delay was such that we preserve a somewhat
> similar cacheline alignment?
I'll move it. I guess alignment wasn't considered before with two u8
and still might be misaligned with the "bool leds_disabled;". But, as
you said, it is not performance sensitive.
> Regardless of that:
>
> Reviewed-by: Florian Fainelli <florian.fainelli@...adcom.com>
> --
> Florian
Regards,
Luiz
Powered by blists - more mailing lists