Re: [PATCH 1/9] nfp: Call FIELD_PREP() in NFP_ETH_SET_BIT_CONFIG() wrapper
From: David Laight
Date: Wed Dec 10 2025 - 05:05:07 EST
On Wed, 10 Dec 2025 18:29:47 +0900
Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
> On Tue, 9 Dec 2025 10:03:05 +0000 david.laight.linux@xxxxxxxxx wrote:
> > Rather than use a define that should be internal to the implementation
> > of FIELD_PREP(), pass the shifted 'val' to nfp_eth_set_bit_config()
> > and change the test for 'value unchanged' to match.
> >
> > This is a simpler change than the one used to avoid calling both
> > FIELD_GET() and FIELD_PREP() with non-constant mask values.
>
> I'd like this code to be left out of the subjective churn please.
> I like it the way I wrote it.
The 'problem' is that I want to remove __BF_FIELD_CHECK().
It has already been split into two (for 6.19) but it makes sense
to split into three (to avoid code-bloat in the cpp output).
IMHO Using a define that is part of the implementation of FIELD_xxxx()
is wrong anyway.
> I also liked the bitfield.h the way
> I wrote it but I guess that part "belongs" to the community at large.
There are already significant changes there for 6.19-rc1
David
>
> FWIW - thumbs up for patch 8, no opinion on the rest.