From: "Mark Pearson" <mpearson-lenovo@squebb.ca>
To: "Rong Zhang" <i@rong.moe>
Cc: "Derek J . Clark" <derekjohn.clark@gmail.com>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 04/13] platform/x86: lenovo: think-lmi: store attributes as linked list
Date: Fri, 04 Dec 2026 10:21:41 -0500 [thread overview]
Message-ID: <4a5b3ae5-bbe9-42c1-baaa-c28f037b357e@app.fastmail.com> (raw)
In-Reply-To: <4f7aa869e791ec25a223a4aa8df028ddbb0f63aa.camel@rong.moe>
On Fri, Dec 4, 2026, at 8:30 AM, Rong Zhang wrote:
> Hi Mark,
>
> On Thu, 2026-12-03 at 21:20 -0500, Mark Pearson wrote:
>> Use a linked list for storing attributes instead of a fixed array.
>>
>> Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
>> ---
>> drivers/platform/x86/lenovo/think-lmi.c | 55 +++++++++++--------------
>> drivers/platform/x86/lenovo/think-lmi.h | 3 +-
>> 2 files changed, 25 insertions(+), 33 deletions(-)
>>
>> diff --git a/drivers/platform/x86/lenovo/think-lmi.c b/drivers/platform/x86/lenovo/think-lmi.c
>> index 6580b1401f01..7a24985882ea 100644
>> --- a/drivers/platform/x86/lenovo/think-lmi.c
>> +++ b/drivers/platform/x86/lenovo/think-lmi.c
>> @@ -1249,6 +1249,7 @@ static void tlmi_attr_setting_release(struct kobject *kobj)
>> {
>> struct tlmi_attr_setting *setting = to_tlmi_attr_setting(kobj);
>>
>> + list_del(&setting->node);
>
> I guess you need a scoped_guard() or lockdep_assert_held() for it, but is
> it useful to keep the list in the first place? It seems that no one
> touches it once probe finishes.
>
Let me know if you mean something different than the below
The only reason for the list is because I use it in tlmi - and then I can keep the same structure for both drivers. It's a weak reason.
In tlmi I need it as there are settings, platform settings and functions - and a list works out quite nicely there, instead of maintaining three arrays. I thought I could use it here too, but it's not a requirement and admittedly not really beneficial. If I should just leave it unchanged I'm fine with that.
Mark
next prev parent reply other threads:[~2026-12-04 15:22 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 2:20 [PATCH 00/13] New Lenovo common WMI driver - tlmi Mark Pearson
2026-12-04 2:20 ` [PATCH 01/13] platform/x86: lenovo: think-lmi: Convert name arrays to pointers Mark Pearson
2026-12-04 2:20 ` [PATCH 02/13] platform/x86: lenovo: think-lmi: Clean up attributes if not added to list Mark Pearson
2026-12-04 13:20 ` Rong Zhang
2026-12-04 15:09 ` Mark Pearson
2026-12-04 2:20 ` [PATCH 03/13] platform/x86: lenovo: think-lmi: cache current value at init Mark Pearson
2026-12-04 13:28 ` Rong Zhang
2026-12-04 15:14 ` Mark Pearson
2026-12-04 2:20 ` [PATCH 04/13] platform/x86: lenovo: think-lmi: store attributes as linked list Mark Pearson
2026-12-04 13:30 ` Rong Zhang
2026-12-04 15:21 ` Mark Pearson [this message]
2026-12-04 16:10 ` Rong Zhang
2026-12-04 2:20 ` [PATCH 05/13] platform/x86: lenovo: tlmi: New tlmi driver for common WMI implementation Mark Pearson
2026-12-04 13:41 ` Rong Zhang
2026-12-04 15:27 ` Mark Pearson
2026-12-05 9:54 ` kernel test robot
2026-12-05 9:55 ` kernel test robot
2026-12-04 2:20 ` [PATCH 06/13] platform/x86: lenovo: tlmi: Add BIOS attributes sysfs entries Mark Pearson
2026-12-04 13:44 ` Rong Zhang
2026-12-04 15:41 ` Mark Pearson
2026-12-04 17:02 ` Rong Zhang
2026-12-04 2:20 ` [PATCH 07/13] platform/x86: lenovo: tlmi: Retrieve auth information Mark Pearson
2026-12-04 13:48 ` Rong Zhang
2026-12-04 15:44 ` Mark Pearson
2026-12-04 17:14 ` Rong Zhang
2026-12-04 17:26 ` Mark Pearson
2026-12-04 2:20 ` [PATCH 08/13] platform/x86: lenovo: Move TLMI helper functions into wmi-helpers Mark Pearson
2026-12-04 13:49 ` Rong Zhang
2026-12-04 15:50 ` Mark Pearson
2026-12-04 17:19 ` Rong Zhang
2026-12-04 17:27 ` Mark Pearson
2026-12-04 2:20 ` [PATCH 09/13] platform/x86: lenovo: tlmi: Add authentication sysfs entries Mark Pearson
2026-12-04 13:52 ` Rong Zhang
2026-12-05 9:55 ` kernel test robot
2026-12-04 2:20 ` [PATCH 10/13] platform/x86: lenovo: tlmi: Add platform attribute support Mark Pearson
2026-12-04 2:20 ` [PATCH 11/13] platform/x86: lenovo: tlmi: Add function attributes support Mark Pearson
2026-12-04 2:20 ` [PATCH 12/13] platform/x86: lenovo: tlmi: Add method identifier Mark Pearson
2026-12-04 2:20 ` [PATCH 13/13] docs: ABI: sysfs-class-firmware-attributes: Update Lenovo sections Mark Pearson
2026-12-04 13:19 ` [PATCH 00/13] New Lenovo common WMI driver - tlmi Rong Zhang
2026-12-04 14:42 ` Mark Pearson
2026-12-04 17:49 ` Rong Zhang
2026-12-04 18:22 ` Mark Pearson
2026-12-04 20:04 ` Rong Zhang
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=4a5b3ae5-bbe9-42c1-baaa-c28f037b357e@app.fastmail.com \
--to=mpearson-lenovo@squebb.ca \
--cc=derekjohn.clark@gmail.com \
--cc=hansg@kernel.org \
--cc=i@rong.moe \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--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®