Commit 14227ce9 authored by Hans de Goede's avatar Hans de Goede

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: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210531135911.82582-1-hdegoede@redhat.com
parent a40cd7ef
......@@ -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";
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment