[PATCH v6 5/8] drivers: mtd: nand: use FIELD_PREP and GENMASK

Miquel Raynal miquel.raynal at bootlin.com
Tue May 21 05:53:27 PDT 2024


Hi,

quic_mdalam at quicinc.com wrote on Tue, 21 May 2024 16:25:29 +0530:

> Use the bitfield macro FIELD_PREP, and GENMASK to
> do the shift and mask in one go. This makes the code
> more readable.
> 
> Signed-off-by: Md Sadre Alam <quic_mdalam at quicinc.com>
> ---
> Change in [v6]
> 
> * Added FIELD_PREP() and GENMASK() macro

Maybe you want to include linux/bitfield.h now.

Otherwise that's a great improvement.

Thanks,
Miquèl



More information about the linux-mtd mailing list