From: "Mark Pearson" <mpearson-lenovo@squebb.ca>
To: "Benjamin Philip" <benjamin.philip495@gmail.com>,
"platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>,
linux-kernel@vger.kernel.org
Cc: "Derek J . Clark" <derekjohn.clark@gmail.com>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: Re: [PATCH 5/5] platform/x86: think-lmi: Clean up alignment
Date: Tue, 23 Dec 2025 15:35:59 -0500 [thread overview]
Message-ID: <9a5d2dfd-6061-45c1-9180-e45c6a520f4c@app.fastmail.com> (raw)
In-Reply-To: <CAMEXYWfO-+7H_9rpmgEruuZunGc69Qh8o1ii_fLkbOKS-0fRnQ@mail.gmail.com>
On Tue, Dec 23, 2025, at 2:24 PM, Benjamin Philip wrote:
> This commit fixes multiple instances of the following checkpatch check:
>
> CHECK: Alignment should match open parenthesis
>
> Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com>
> ---
> drivers/platform/x86/lenovo/think-lmi.c | 75 +++++++++++++------------
> 1 file changed, 38 insertions(+), 37 deletions(-)
>
> diff --git a/drivers/platform/x86/lenovo/think-lmi.c
> b/drivers/platform/x86/lenovo/think-lmi.c
> index 07ba0d84720a..ccb767c3972e 100644
> --- a/drivers/platform/x86/lenovo/think-lmi.c
> +++ b/drivers/platform/x86/lenovo/think-lmi.c
> @@ -424,7 +424,7 @@ static int tlmi_get_bios_selections(const char
> *item, char **value)
>
> /* ---- Authentication sysfs
> --------------------------------------------------------- */
> static ssize_t is_enabled_show(struct kobject *kobj, struct
> kobj_attribute *attr,
> - char *buf)
> + char *buf)
> {
> struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj);
>
> @@ -513,7 +513,7 @@ static ssize_t new_password_store(struct kobject *kobj,
> */
> if (tlmi_priv.pwd_admin->pwd_enabled &&
> strlen(tlmi_priv.pwd_admin->password)) {
> ret = tlmi_opcode_setting("WmiOpcodePasswordAdmin",
> - tlmi_priv.pwd_admin->password);
> + tlmi_priv.pwd_admin->password);
> if (ret)
> goto out;
> }
> @@ -527,8 +527,8 @@ static ssize_t new_password_store(struct kobject *kobj,
> } else {
> /* Format: 'PasswordType,CurrentPw,NewPw,Encoding,KbdLang;' */
> auth_str = kasprintf(GFP_KERNEL, "%s,%s,%s,%s,%s;",
> - setting->pwd_type, setting->password, new_pwd,
> - encoding_options[setting->encoding], setting->kbdlang);
> + setting->pwd_type, setting->password, new_pwd,
> + encoding_options[setting->encoding], setting->kbdlang);
> if (!auth_str) {
> ret = -ENOMEM;
> goto out;
> @@ -545,7 +545,7 @@ static ssize_t new_password_store(struct kobject *kobj,
> static struct kobj_attribute auth_new_password = __ATTR_WO(new_password);
>
> static ssize_t min_password_length_show(struct kobject *kobj, struct
> kobj_attribute *attr,
> - char *buf)
> + char *buf)
> {
> struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj);
>
> @@ -555,16 +555,17 @@ static ssize_t min_password_length_show(struct
> kobject *kobj, struct kobj_attrib
> static struct kobj_attribute auth_min_pass_length =
> __ATTR_RO(min_password_length);
>
> static ssize_t max_password_length_show(struct kobject *kobj, struct
> kobj_attribute *attr,
> - char *buf)
> + char *buf)
> {
> struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj);
>
> return sysfs_emit(buf, "%d\n", setting->maxlen);
> }
> +
> static struct kobj_attribute auth_max_pass_length =
> __ATTR_RO(max_password_length);
>
> static ssize_t mechanism_show(struct kobject *kobj, struct
> kobj_attribute *attr,
> - char *buf)
> + char *buf)
> {
> struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj);
>
> @@ -601,16 +602,15 @@ static ssize_t encoding_store(struct kobject
> *kobj, struct kobj_attribute *attr,
> static struct kobj_attribute auth_encoding = __ATTR_RW(encoding);
>
> static ssize_t kbdlang_show(struct kobject *kobj, struct kobj_attribute *attr,
> - char *buf)
> + char *buf)
> {
> struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj);
>
> return sysfs_emit(buf, "%s\n", setting->kbdlang);
> }
>
> -static ssize_t kbdlang_store(struct kobject *kobj,
> - struct kobj_attribute *attr,
> - const char *buf, size_t count)
> +static ssize_t kbdlang_store(struct kobject *kobj, struct kobj_attribute *attr,
> + const char *buf, size_t count)
> {
> struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj);
> int length;
> @@ -665,16 +665,15 @@ static ssize_t index_store(struct kobject *kobj,
> struct kobj_attribute *attr,
> static struct kobj_attribute auth_index = __ATTR_RW(index);
>
> static ssize_t level_show(struct kobject *kobj, struct kobj_attribute *attr,
> - char *buf)
> + char *buf)
> {
> struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj);
>
> return sysfs_emit(buf, "%s\n", level_options[setting->level]);
> }
>
> -static ssize_t level_store(struct kobject *kobj,
> - struct kobj_attribute *attr,
> - const char *buf, size_t count)
> +static ssize_t level_store(struct kobject *kobj, struct kobj_attribute *attr,
> + const char *buf, size_t count)
> {
> struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj);
> int i;
> @@ -731,8 +730,9 @@ static ssize_t cert_thumbprint(char *buf, const
> char *arg, int count)
>
> static char *thumbtypes[] = {"Md5", "Sha1", "Sha256"};
>
> -static ssize_t certificate_thumbprint_show(struct kobject *kobj,
> struct kobj_attribute *attr,
> - char *buf)
> +static ssize_t certificate_thumbprint_show(struct kobject *kobj,
> + struct kobj_attribute *attr,
> + char *buf)
> {
> struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj);
> unsigned int i;
> @@ -764,8 +764,8 @@ static ssize_t certificate_thumbprint_show(struct
> kobject *kobj, struct kobj_att
> static struct kobj_attribute auth_cert_thumb =
> __ATTR_RO(certificate_thumbprint);
>
> static ssize_t cert_to_password_store(struct kobject *kobj,
> - struct kobj_attribute *attr,
> - const char *buf, size_t count)
> + struct kobj_attribute *attr,
> + const char *buf, size_t count)
> {
> struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj);
> char *auth_str, *passwd;
> @@ -809,8 +809,8 @@ enum cert_install_mode {
> };
>
> static ssize_t certificate_store(struct kobject *kobj,
> - struct kobj_attribute *attr,
> - const char *buf, size_t count)
> + struct kobj_attribute *attr, const char *buf,
> + size_t count)
> {
> struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj);
> enum cert_install_mode install_mode = TLMI_CERT_INSTALL;
> @@ -913,8 +913,8 @@ static ssize_t certificate_store(struct kobject *kobj,
> static struct kobj_attribute auth_certificate = __ATTR_WO(certificate);
>
> static ssize_t signature_store(struct kobject *kobj,
> - struct kobj_attribute *attr,
> - const char *buf, size_t count)
> + struct kobj_attribute *attr, const char *buf,
> + size_t count)
> {
> struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj);
> char *new_signature;
> @@ -940,8 +940,8 @@ static ssize_t signature_store(struct kobject *kobj,
> static struct kobj_attribute auth_signature = __ATTR_WO(signature);
>
> static ssize_t save_signature_store(struct kobject *kobj,
> - struct kobj_attribute *attr,
> - const char *buf, size_t count)
> + struct kobj_attribute *attr,
> + const char *buf, size_t count)
> {
> struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj);
> char *new_signature;
> @@ -1029,8 +1029,8 @@ static const struct attribute_group auth_attr_group = {
> __ATTRIBUTE_GROUPS(auth_attr);
>
> /* ---- Attributes sysfs
> --------------------------------------------------------- */
> -static ssize_t display_name_show(struct kobject *kobj, struct
> kobj_attribute *attr,
> - char *buf)
> +static ssize_t display_name_show(struct kobject *kobj,
> + struct kobj_attribute *attr, char *buf)
> {
> struct tlmi_attr_setting *setting = to_tlmi_attr_setting(kobj);
>
> @@ -1069,7 +1069,7 @@ static ssize_t possible_values_show(struct
> kobject *kobj, struct kobj_attribute
> }
>
> static ssize_t type_show(struct kobject *kobj, struct kobj_attribute *attr,
> - char *buf)
> + char *buf)
> {
> struct tlmi_attr_setting *setting = to_tlmi_attr_setting(kobj);
>
> @@ -1491,15 +1491,15 @@ static int tlmi_sysfs_init(void)
> {
> int i, ret;
>
> - tlmi_priv.class_dev = device_create(&firmware_attributes_class,
> NULL, MKDEV(0, 0),
> - NULL, "%s", "thinklmi");
> + tlmi_priv.class_dev = device_create(&firmware_attributes_class, NULL,
> + MKDEV(0, 0), NULL, "%s", "thinklmi");
> if (IS_ERR(tlmi_priv.class_dev)) {
> ret = PTR_ERR(tlmi_priv.class_dev);
> goto fail_class_created;
> }
>
> tlmi_priv.attribute_kset = kset_create_and_add("attributes", NULL,
> - &tlmi_priv.class_dev->kobj);
> + &tlmi_priv.class_dev->kobj);
> if (!tlmi_priv.attribute_kset) {
> ret = -ENOMEM;
> goto fail_device_created;
> @@ -1637,8 +1637,8 @@ static int tlmi_analyze(struct wmi_device *wdev)
> tlmi_priv.opcode_support = true;
>
> if (wmi_has_guid(LENOVO_SET_BIOS_CERT_GUID) &&
> - wmi_has_guid(LENOVO_SET_BIOS_SETTING_CERT_GUID) &&
> - wmi_has_guid(LENOVO_SAVE_BIOS_SETTING_CERT_GUID))
> + wmi_has_guid(LENOVO_SET_BIOS_SETTING_CERT_GUID) &&
> + wmi_has_guid(LENOVO_SAVE_BIOS_SETTING_CERT_GUID))
> tlmi_priv.certificate_support = true;
>
> /* ThinkCenter uses different GUIDs for certificate support */
> @@ -1693,7 +1693,7 @@ static int tlmi_analyze(struct wmi_device *wdev)
> &setting->possible_values);
> if (ret || !setting->possible_values)
> pr_info("Error retrieving possible values for %d : %s\n",
> - i, setting->display_name);
> + i, setting->display_name);
> } else {
> /*
> * Older Thinkstations don't support the bios_selections API.
> @@ -1710,8 +1710,9 @@ static int tlmi_analyze(struct wmi_device *wdev)
> optend = strstr(optstart, "]");
> if (optend)
> setting->possible_values =
> - kstrndup(optstart, optend - optstart,
> - GFP_KERNEL);
> + kstrndup(optstart,
> + optend - optstart,
> + GFP_KERNEL);
> }
> kfree(optitem);
> }
> @@ -1772,7 +1773,7 @@ static int tlmi_analyze(struct wmi_device *wdev)
> if (tlmi_priv.pwdcfg.core.password_state & TLMI_HDD_PWD) {
> /* Check if PWD is configured and set index to first drive found */
> if (tlmi_priv.pwdcfg.ext.hdd_user_password ||
> - tlmi_priv.pwdcfg.ext.hdd_master_password) {
> + tlmi_priv.pwdcfg.ext.hdd_master_password) {
> tlmi_priv.pwd_hdd->pwd_enabled = true;
> if (tlmi_priv.pwdcfg.ext.hdd_master_password)
> tlmi_priv.pwd_hdd->index =
> --
> 2.52.0
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
prev parent reply other threads:[~2025-12-23 20:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-23 19:09 [PATCH 0/5] platform/x86: think-lmi: Clean up code style Benjamin Philip
2025-12-23 19:19 ` [PATCH 1/5] platform/x86: think-lmi: Clean up types in headers Benjamin Philip
[not found] ` <20251223191932.946794-1-benjamin.philip495@gmail.com>
2025-12-23 19:23 ` [PATCH 2/5] platform/x86: think-lmi: Remove unnecessary parens Benjamin Philip
2025-12-23 20:28 ` Mark Pearson
2025-12-24 11:44 ` Benjamin Philip
2025-12-23 19:24 ` [PATCH 3/5] platform/x86: think-lmi: Clean up misc checks Benjamin Philip
2025-12-23 20:30 ` Mark Pearson
2025-12-23 19:24 ` [PATCH 4/5] platform/x86: think-lmi: fix column limit overflow Benjamin Philip
2025-12-23 20:34 ` Mark Pearson
2025-12-24 11:33 ` Benjamin Philip
2025-12-29 15:59 ` Ilpo Järvinen
2025-12-29 17:00 ` Benjamin Philip
2025-12-29 17:32 ` Ilpo Järvinen
2025-12-30 3:07 ` Mark Pearson
2025-12-30 3:24 ` Benjamin Philip
2025-12-31 2:47 ` Mark Pearson
2026-01-06 19:33 ` Benjamin Philip
2026-01-07 14:34 ` Mark Pearson
2025-12-23 19:24 ` [PATCH 5/5] platform/x86: think-lmi: Clean up alignment Benjamin Philip
2025-12-23 20:35 ` Mark Pearson [this message]
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=9a5d2dfd-6061-45c1-9180-e45c6a520f4c@app.fastmail.com \
--to=mpearson-lenovo@squebb.ca \
--cc=benjamin.philip495@gmail.com \
--cc=derekjohn.clark@gmail.com \
--cc=hansg@kernel.org \
--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®