diff options
author | Hans de Goede <hdegoede@redhat.com> | 2021-05-31 16:59:11 +0300 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-06-16 18:47:52 +0300 |
commit | 14227ce92a402f7a3d51d05dae14d9d22211e501 (patch) | |
tree | cc813b19a580e1752070a811ac56429ab59d9124 /drivers/platform | |
parent | a40cd7ef22fbb11229cf982920f4ec96c1f49282 (diff) | |
download | linux-14227ce92a402f7a3d51d05dae14d9d22211e501.tar.xz |
platform/x86: thinkpad-lmi: Remove unused display_name member from struct tlmi_pwd_setting
The struct tlmi_pwd_setting display_name member is initialized,
but never read. Remove it and the TLMI_PWDTYPE_MAXLEN define.
While at it also remove some other unused [MAX]LEN defines.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210531135911.82582-1-hdegoede@redhat.com
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/think-lmi.c | 2 | ||||
-rw-r--r-- | drivers/platform/x86/think-lmi.h | 9 |
2 files changed, 0 insertions, 11 deletions
diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c index 854427fed1a9..782d8e3fe7a1 100644 --- a/drivers/platform/x86/think-lmi.c +++ b/drivers/platform/x86/think-lmi.c @@ -819,7 +819,6 @@ static int tlmi_analyze(void) ret = -ENOMEM; goto fail_clear_attr; } - strscpy(tlmi_priv.pwd_admin->display_name, "admin", TLMI_PWDTYPE_MAXLEN); strscpy(tlmi_priv.pwd_admin->kbdlang, "us", TLMI_LANG_MAXLEN); tlmi_priv.pwd_admin->encoding = TLMI_ENCODING_ASCII; tlmi_priv.pwd_admin->pwd_type = "pap"; @@ -836,7 +835,6 @@ static int tlmi_analyze(void) ret = -ENOMEM; goto fail_clear_attr; } - strscpy(tlmi_priv.pwd_power->display_name, "power-on", TLMI_PWDTYPE_MAXLEN); strscpy(tlmi_priv.pwd_power->kbdlang, "us", TLMI_LANG_MAXLEN); tlmi_priv.pwd_power->encoding = TLMI_ENCODING_ASCII; tlmi_priv.pwd_power->pwd_type = "pop"; diff --git a/drivers/platform/x86/think-lmi.h b/drivers/platform/x86/think-lmi.h index 6cd5325cc50e..6fa8da7af6c7 100644 --- a/drivers/platform/x86/think-lmi.h +++ b/drivers/platform/x86/think-lmi.h @@ -8,15 +8,7 @@ #define TLMI_SETTINGS_COUNT 256 #define TLMI_SETTINGS_MAXLEN 512 #define TLMI_PWD_BUFSIZE 129 -#define TLMI_PWDTYPE_MAXLEN 64 -#define TLMI_ENC_MAXLEN 64 #define TLMI_LANG_MAXLEN 4 -#define TLMI_PWDTYPE_LEN 4 -/* - * Longest string should be in the set command: allow size of BIOS - * option and choice - */ -#define TLMI_GETSET_MAXLEN (TLMI_SETTINGS_MAXLEN + TLMI_SETTINGS_MAXLEN) /* Possible error values */ struct tlmi_err_codes { @@ -43,7 +35,6 @@ struct tlmi_pwdcfg { struct tlmi_pwd_setting { struct kobject kobj; bool valid; - char display_name[TLMI_PWDTYPE_MAXLEN]; char password[TLMI_PWD_BUFSIZE]; const char *pwd_type; const char *role; |