Re: [PATCH v1 1/1] regmap: Add REG_FIELD_GENMASK() helper macro

From: Victor Chernyakin

Date: Thu Nov 05 2026 - 11:09:08 EST


> #define REG_FIELD_GENMASK(_reg_field) GENMASK(_reg_field.msb, _reg_field.lsb)

Macro parameter should have parens around it:

+ #define REG_FIELD_GENMASK(_reg_field) GENMASK((_reg_field).msb, (_reg_field).lsb)

(In the patch you link to, I wrote it without parens at first too,
then had to figure out why I was getting "too many arguments to macro"
error messages)




BTW, I've been thinking about making reg_field store the mask directly,
by putting GENMASK(lsb, msb) in the REG_FIELD macro, but that's probably
a more involved change.