[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMEXYWfO-+7H_9rpmgEruuZunGc69Qh8o1ii_fLkbOKS-0fRnQ@mail.gmail.com>
Date: Tue, 23 Dec 2025 19:24:21 +0000
From: Benjamin Philip <benjamin.philip495@...il.com>
To: platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Mark Pearson <mpearson-lenovo@...ebb.ca>, "Derek J. Clark" <derekjohn.clark@...il.com>,
Hans de Goede <hansg@...nel.org>, Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Benjamin Philip <benjamin.philip495@...il.com>
Subject: [PATCH 5/5] platform/x86: think-lmi: Clean up alignment
This commit fixes multiple instances of the following checkpatch check:
CHECK: Alignment should match open parenthesis
Signed-off-by: Benjamin Philip <benjamin.philip495@...il.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
Powered by blists - more mailing lists