On Mon, 2021-05-17 at 16:19 -0400, Wen Gong wrote: > > +#define TX_PWR_ENV_INFO_COUNT GENMASK(2, 0) > +#define TX_PWR_ENV_INFO_INTERPRET GENMASK(5, 3) > +#define TX_PWR_ENV_INFO_CATEGORY GENMASK(7, 6) Personally, I'm not a big fan of GENMASK(), seems more complicated to me than 0x0007 0x0038 0x00c0 but YMMV :) We haven't really used GENMASK here anywhere else, have we? > +#define GET_TX_PWR_ENV_COUNT(fv) FIELD_GET(TX_PWR_ENV_INFO_COUNT, fv) > +#define GET_TX_PWR_ENV_INTERPRET(fv) FIELD_GET(TX_PWR_ENV_INFO_INTERPRET, fv) > +#define GET_TX_PWR_ENV_CATEGORY(fv) FIELD_GET(TX_PWR_ENV_INFO_CATEGORY, fv) I don't think we really need these, and we should be using u*_get_bits() anyway rather than FIELD_GET. johannes