From: "Mark Pearson" <mpearson-lenovo@squebb.ca>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: "Hans de Goede" <hdegoede@redhat.com>,
"Jonathan Corbet" <corbet@lwn.net>,
ikepanhc@gmail.com,
"Henrique de Moraes Holschuh" <hmh@hmh.eng.br>,
"Armin Wolf" <W_Armin@gmx.de>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
linux-doc@vger.kernel.org,
"platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>,
ibm-acpi-devel@lists.sourceforge.net,
LKML <linux-kernel@vger.kernel.org>,
"kernel test robot" <lkp@intel.com>
Subject: Re: [PATCH v3 2/2] platform/x86: thinklmi: improved DMI handling
Date: Tue, 10 Jun 2025 08:28:49 -0400 [thread overview]
Message-ID: <f3b5c138-5576-4c01-b177-7450f1e91d24@app.fastmail.com> (raw)
In-Reply-To: <b792059e-44d2-82c0-574c-76c3f6a3129d@linux.intel.com>
Hi Ilpo,
On Tue, Jun 10, 2025, at 3:35 AM, Ilpo Järvinen wrote:
> On Mon, 9 Jun 2025, Mark Pearson wrote:
>
>> Fix issues reported by kernel test robot.
>> - Require DMI for think-lmi.
>> - Check return from getting serial string
>>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Closes: https://lore.kernel.org/oe-kbuild-all/202506062319.F0IpDxF6-lkp@intel.com/
>>
>> Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
>> ---
>> - New patch added to series.
>>
>> drivers/platform/x86/lenovo/Kconfig | 1 +
>> drivers/platform/x86/lenovo/think-lmi.c | 8 +++++---
>> 2 files changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/platform/x86/lenovo/Kconfig b/drivers/platform/x86/lenovo/Kconfig
>> index a4b565283768..207dd7f88ed0 100644
>> --- a/drivers/platform/x86/lenovo/Kconfig
>> +++ b/drivers/platform/x86/lenovo/Kconfig
>> @@ -197,6 +197,7 @@ config THINKPAD_ACPI_HOTKEY_POLL
>> config THINKPAD_LMI
>> tristate "Lenovo WMI-based systems management driver"
>> depends on ACPI_WMI
>> + depends on DMI
>> select FW_ATTR_CLASS
>> help
>> This driver allows changing BIOS settings on Lenovo machines whose
>> diff --git a/drivers/platform/x86/lenovo/think-lmi.c b/drivers/platform/x86/lenovo/think-lmi.c
>> index 143d9fdedb65..8f70c60f791f 100644
>> --- a/drivers/platform/x86/lenovo/think-lmi.c
>> +++ b/drivers/platform/x86/lenovo/think-lmi.c
>> @@ -772,6 +772,7 @@ static ssize_t certificate_store(struct kobject *kobj,
>> struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj);
>> enum cert_install_mode install_mode = TLMI_CERT_INSTALL;
>> char *auth_str, *new_cert;
>> + const char *serial;
>> char *signature;
>> char *guid;
>> int ret;
>> @@ -789,9 +790,10 @@ static ssize_t certificate_store(struct kobject *kobj,
>> return -EACCES;
>>
>> /* Format: 'serial#, signature' */
>> - auth_str = cert_command(setting,
>> - dmi_get_system_info(DMI_PRODUCT_SERIAL),
>> - setting->signature);
>> + serial = dmi_get_system_info(DMI_PRODUCT_SERIAL);
>> + if (!serial)
>> + return -EINVAL;
>
> This should not return -EINVAL as it is not a problem with the input
> parameters. Perhaps -ENODEV would make sense instead?
>
Good point.
Unless Andy strongly thinks I should drop this bit, I'll fix in the next version
Thanks
Mark
next prev parent reply other threads:[~2025-06-10 12:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-09 12:27 [PATCH v3 1/2] platform/x86: Move Lenovo files into lenovo subdir Mark Pearson
2025-06-09 12:27 ` [PATCH v3 2/2] platform/x86: thinklmi: improved DMI handling Mark Pearson
2025-06-09 20:19 ` Andy Shevchenko
2025-06-10 1:26 ` Mark Pearson
2025-06-10 7:35 ` Ilpo Järvinen
2025-06-10 12:28 ` Mark Pearson [this message]
2025-06-10 13:33 ` Andy Shevchenko
2025-06-09 20:17 ` [PATCH v3 1/2] platform/x86: Move Lenovo files into lenovo subdir Andy Shevchenko
2025-06-10 1:21 ` Mark Pearson
2025-06-10 10:01 ` Andy Shevchenko
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=f3b5c138-5576-4c01-b177-7450f1e91d24@app.fastmail.com \
--to=mpearson-lenovo@squebb.ca \
--cc=W_Armin@gmx.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=corbet@lwn.net \
--cc=hdegoede@redhat.com \
--cc=hmh@hmh.eng.br \
--cc=ibm-acpi-devel@lists.sourceforge.net \
--cc=ikepanhc@gmail.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--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®