Subject: Re: [PATCH 1/9] nfp: Call FIELD_PREP() in NFP_ETH_SET_BIT_CONFIG() wrapper

From: David Laight <[email-masked]>
Date: Wed, 10 Dec 2025 10:04:58 +0000

On Wed, 10 Dec 2025 18:29:47 +0900
Jakub Kicinski <[email-masked]> wrote:

> On Tue,  9 Dec 2025 10:03:05 +0000 [email-masked] 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.