On Wed, 25 Feb 2026, Derek J. Clark wrote: > On February 24, 2026 12:42:08 AM PST, "Ilpo Järvinen" wrote: > >On Tue, 24 Feb 2026, Derek J. Clark wrote: > > > >> Adds LWMI_ATTR_ID macro. In the same vein as LWMI_ATTR_ID_FAN_RPM, > >> but as a generic, to de-duplicate attribute_id assignment biolerplate. > >> > >> Reviewed-by: Mark Pearson > >> Signed-off-by: Derek J. Clark > >> --- > >> drivers/platform/x86/lenovo/wmi-capdata.h | 6 ++++ > >> drivers/platform/x86/lenovo/wmi-gamezone.h | 1 + > >> drivers/platform/x86/lenovo/wmi-other.c | 36 ++++++---------------- > >> 3 files changed, 17 insertions(+), 26 deletions(-) > >> > >> diff --git a/drivers/platform/x86/lenovo/wmi-capdata.h b/drivers/platform/x86/lenovo/wmi-capdata.h > >> index 8c1df3efcc55..27202e2dc8a5 100644 > >> --- a/drivers/platform/x86/lenovo/wmi-capdata.h > >> +++ b/drivers/platform/x86/lenovo/wmi-capdata.h > >> @@ -17,6 +17,12 @@ > >> #define LWMI_ATTR_MODE_ID_MASK GENMASK(15, 8) > >> #define LWMI_ATTR_TYPE_ID_MASK GENMASK(7, 0) > >> > >> +#define LWMI_ATTR_ID(dev, feat, mode, type) \ > >> + (FIELD_PREP(LWMI_ATTR_DEV_ID_MASK, dev) | \ > >> + FIELD_PREP(LWMI_ATTR_FEAT_ID_MASK, feat) | \ > >> + FIELD_PREP(LWMI_ATTR_MODE_ID_MASK, mode) | \ > >> + FIELD_PREP(LWMI_ATTR_TYPE_ID_MASK, type)) > > > >Why does this need to be macro? Static inline would have proper types. > > > > Hi Ilpo, > > It doesn't, I was just keeping it consistent with other previous uses. > It's not a problem to change it. I'll need to move it somewhere else > since this is a header. Did you mean to some other file? (As you can have static inline functions just fine in a header.) -- i.