From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: "Derek J. Clark" <derekjohn.clark@gmail.com>
Cc: Hans de Goede <hansg@kernel.org>,
Mark Pearson <mpearson-lenovo@squebb.ca>,
Armin Wolf <W_Armin@gmx.de>, Jonathan Corbet <corbet@lwn.net>,
Rong Zhang <i@rong.moe>, Kurt Borja <kuurtb@gmail.com>,
platform-driver-x86@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/6] platform/x86: lenovo-wmi-other: Add LWMI_ATTR_ID Macro
Date: Thu, 26 Feb 2026 11:18:15 +0200 (EET) [thread overview]
Message-ID: <c3a56c8a-b28a-1f48-c834-e34933158c24@linux.intel.com> (raw)
In-Reply-To: <947F9B21-0300-4C2A-A8DB-DC190DCE7004@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1802 bytes --]
On Wed, 25 Feb 2026, Derek J. Clark wrote:
> On February 24, 2026 12:42:08 AM PST, "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com> 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 <mpearson-lenovo@squebb.ca>
> >> Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
> >> ---
> >> 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.
next prev parent reply other threads:[~2026-02-26 9:18 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-24 4:31 [PATCH v3 0/6] platform-x86: lenovo-wmi: Add fixes and enhancement Derek J. Clark
2026-02-24 4:31 ` [PATCH v3 1/6] platform/x86: lenovo-wmi-other: Add LWMI_ATTR_ID Macro Derek J. Clark
2026-02-24 8:42 ` Ilpo Järvinen
2026-02-25 17:52 ` Derek J. Clark
2026-02-26 9:18 ` Ilpo Järvinen [this message]
2026-02-24 8:43 ` Ilpo Järvinen
2026-02-24 4:31 ` [PATCH v3 2/6] platform/x86: lenovo-wmi-other: Limit adding attributes to supported devices Derek J. Clark
2026-02-24 8:47 ` Ilpo Järvinen
2026-02-25 17:58 ` Derek J. Clark
2026-02-26 9:20 ` Ilpo Järvinen
2026-02-25 17:14 ` Rong Zhang
2026-02-25 18:09 ` Derek J. Clark
2026-02-25 18:33 ` Rong Zhang
2026-02-24 4:31 ` [PATCH v3 3/6] platform/x86: lenovo-wmi-other: Add missing CPU tunable attributes Derek J. Clark
2026-02-24 8:49 ` Ilpo Järvinen
2026-02-24 4:31 ` [PATCH v3 4/6] platform/x86: lenovo-wmi-other: Add GPU " Derek J. Clark
2026-02-24 5:29 ` Derek J. Clark
2026-02-24 8:49 ` Ilpo Järvinen
2026-02-24 4:31 ` [PATCH v3 5/6] platform-x86: lenovo-wmi-other: Rename LWMI_OM_FW_ATTR_BASE_PATH Derek J. Clark
2026-02-24 8:51 ` Ilpo Järvinen
2026-02-25 18:00 ` Derek J. Clark
2026-02-25 17:25 ` Rong Zhang
2026-02-25 18:11 ` Derek J. Clark
2026-02-24 4:32 ` [PATCH v3 6/6] platform/x86: lenovo-wmi-other: Add WMI battery charge limiting Derek J. Clark
2026-02-24 9:05 ` Ilpo Järvinen
2026-02-25 18:04 ` Derek J. Clark
2026-02-24 9:17 ` Ilpo Järvinen
2026-02-25 17:55 ` Rong Zhang
2026-02-25 18:23 ` Derek J. Clark
2026-02-25 18:44 ` Rong Zhang
2026-02-25 18:02 ` [PATCH v3 0/6] platform-x86: lenovo-wmi: Add fixes and enhancement Rong Zhang
2026-02-25 18:26 ` Derek J. Clark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c3a56c8a-b28a-1f48-c834-e34933158c24@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=W_Armin@gmx.de \
--cc=corbet@lwn.net \
--cc=derekjohn.clark@gmail.com \
--cc=hansg@kernel.org \
--cc=i@rong.moe \
--cc=kuurtb@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpearson-lenovo@squebb.ca \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox