[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241107114728.109051bc@kmaincent-XPS-13-7390>
Date: Thu, 7 Nov 2024 11:47:28 +0100
From: Kory Maincent <kory.maincent@...tlin.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: 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>, Simon Horman
<horms@...nel.org>, 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 v2 03/18] net: pse-pd: tps23881: Use
helpers to calculate bit offset for a channel
On Thu, 31 Oct 2024 22:11:18 +0100
Andrew Lunn <andrew@...n.ch> wrote:
> > + val = tps23881_set_val(ret, chan, 0, BIT(chan % 4), BIT(chan % 4));
> > + val = tps23881_set_val(val, chan, 0, BIT(chan % 4),
> > + BIT(chan % 4));
> > + val = tps23881_set_val(ret, chan, 4, BIT(chan % 4), BIT(chan % 4));
> > + val = tps23881_set_val(val, chan, 4, BIT(chan % 4),
> > + BIT(chan % 4));
> > + val = tps23881_calc_val(ret, chan, 0, BIT(chan % 4));
> > + val = tps23881_calc_val(ret, chan, 0, BIT(chan % 4));
> > + val = tps23881_calc_val(ret, chan, 0, BIT(chan % 4));
> > + val = tps23881_calc_val(ret, chan, 4, BIT(chan % 4));
> > + val = tps23881_calc_val(ret, chan, 0, BIT(chan % 4));
> > + val = tps23881_calc_val(ret, chan, 4, BIT(chan % 4));
>
> It looks like all the callers of this helper pass BIT(chan % 4) as the
> last parameter. Maybe move that into the helper as well?
There is different cases in the patch 4 of the series.
Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
Powered by blists - more mailing lists