[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241203114438.4f6d4c36@kmaincent-XPS-13-7390>
Date: Tue, 3 Dec 2024 11:44:38 +0100
From: Kory Maincent <kory.maincent@...tlin.com>
To: Simon Horman <horms@...nel.org>
Cc: Andrew Lunn <andrew@...n.ch>, Oleksij Rempel <o.rempel@...gutronix.de>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
<pabeni@...hat.com>, Jonathan Corbet <corbet@....net>, Donald Hunter
<donald.hunter@...il.com>, Rob Herring <robh@...nel.org>, Andrew Lunn
<andrew+netdev@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>, Russell
King <linux@...linux.org.uk>, Liam Girdwood <lgirdwood@...il.com>, Mark
Brown <broonie@...nel.org>, Thomas Petazzoni
<thomas.petazzoni@...tlin.com>, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, linux-doc@...r.kernel.org, Kyle Swenson
<kyle.swenson@....tech>, Dent Project <dentproject@...uxfoundation.org>,
kernel@...gutronix.de, Maxime Chevallier <maxime.chevallier@...tlin.com>
Subject: Re: [PATCH RFC net-next v3 26/27] net: pse-pd: tps23881: Add
support for static port priority feature
Hello Simon,
On Tue, 3 Dec 2024 10:29:13 +0000
Simon Horman <horms@...nel.org> wrote:
>
> > +static int tps23881_irq_event_detection(struct tps23881_priv *priv,
> > + u16 reg_val,
> > + unsigned long *notifs,
> > + unsigned long *notifs_mask)
> > +{
> > + enum ethtool_pse_events event;
> > + int reg, ret, i, val;
> > + u8 chans;
> > +
> > + chans = tps23881_it_export_chans_helper(reg_val, 0);
> > + for_each_set_bit(i, (unsigned long *)&chans, TPS23881_MAX_CHANS) {
> >
>
> Hi Kory,
>
> The storage size of chans is only 1 byte, but here we are pretending that
> it has more space. Which seems to be a bit of a stretch. Perhaps it would
> be better to simply use unsigned long as the type of chans here and in
> tps23881_irq_event_classification().
Yes indeed. Thanks for the report.
Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
Powered by blists - more mailing lists