From: "Derek J. Clark" <derekjohn.clark@gmail.com>
To: "Rong Zhang" <i@rong.moe>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Hans de Goede" <hansg@kernel.org>
Cc: Mark Pearson <mpearson-lenovo@squebb.ca>,
Armin Wolf <W_Armin@gmx.de>, Jonathan Corbet <corbet@lwn.net>,
Kurt Borja <kuurtb@gmail.com>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 5/6] platform-x86: lenovo-wmi-other: Rename LWMI_OM_FW_ATTR_BASE_PATH
Date: Wed, 25 Feb 2026 10:11:01 -0800 [thread overview]
Message-ID: <A29F4591-D06B-444A-B0E8-7B2ACD1EA3F4@gmail.com> (raw)
In-Reply-To: <239e134c7530004cc004233cb292851ea6864590.camel@rong.moe>
On February 25, 2026 9:25:45 AM PST, Rong Zhang <i@rong.moe> wrote:
>Hi Derek,
>
>On Tue, 2026-02-24 at 04:31 +0000, Derek J. Clark wrote:
>> In the next patch a power supply extension is added which requires
>> a name attribute. Instead of creating another const macro with the
>> same information, replace LWMI_OM_FW_ATTR_BASE_PATH with
>> LWMI_OM_NAME and use that for firmware attributes and power supply
>> extension.
>>
>> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
>> Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
>> ---
>> drivers/platform/x86/lenovo/wmi-other.c | 9 ++++-----
>> 1 file changed, 4 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/platform/x86/lenovo/wmi-other.c b/drivers/platform/x86/lenovo/wmi-other.c
>> index 67768f6a50e0..7f0d5a17b44f 100644
>> --- a/drivers/platform/x86/lenovo/wmi-other.c
>> +++ b/drivers/platform/x86/lenovo/wmi-other.c
>> @@ -90,13 +90,13 @@ enum lwmi_feature_id_gpu {
>> #define LWMI_FAN_NR 4
>> #define LWMI_FAN_ID(x) ((x) + LWMI_FAN_ID_BASE)
>>
>> +#define LWMI_FAN_DIV 100
>> +
>> #define LWMI_ATTR_ID_FAN_RPM(x) \
>> LWMI_ATTR_ID(LWMI_DEVICE_ID_FAN, LWMI_FEATURE_ID_FAN_RPM, \
>> LWMI_GZ_THERMAL_MODE_NONE, LWMI_FAN_ID(x))
>>
>> -#define LWMI_FAN_DIV 100
>
>I placed it here intentionally as it has nothing to do with
>LWMI_ATTR_ID (contrary to other fan-related macros) and is just a
>descriptive macro.
Understandable. I think it makes sense to keep the fan related defines all together since I'll be adding additional LWMI_ATTR_ID defines here later.
>> -
>> -#define LWMI_OM_FW_ATTR_BASE_PATH "lenovo-wmi-other"
>> +#define LWMI_OM_SYSFS_NAME "lenovo-wmi-other"
>> #define LWMI_OM_HWMON_NAME "lenovo_wmi_other"
>>
>> static BLOCKING_NOTIFIER_HEAD(om_chain_head);
>> @@ -1233,8 +1233,7 @@ static int lwmi_om_fw_attr_add(struct lwmi_om_priv *priv)
>>
>> priv->fw_attr_dev = device_create(&firmware_attributes_class, NULL,
>> MKDEV(0, 0), NULL, "%s-%u",
>> - LWMI_OM_FW_ATTR_BASE_PATH,
>> - priv->ida_id);
>> + LWMI_OM_SYSFS_NAME, priv->ida_id);
>> if (IS_ERR(priv->fw_attr_dev)) {
>> err = PTR_ERR(priv->fw_attr_dev);
>> goto err_free_ida;
>
>Thanks,
>Rong
next prev parent reply other threads:[~2026-02-25 18:11 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
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 [this message]
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=A29F4591-D06B-444A-B0E8-7B2ACD1EA3F4@gmail.com \
--to=derekjohn.clark@gmail.com \
--cc=W_Armin@gmx.de \
--cc=corbet@lwn.net \
--cc=hansg@kernel.org \
--cc=i@rong.moe \
--cc=ilpo.jarvinen@linux.intel.com \
--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
all inboxes | Powered by JetHome®