Fix incorrect sscanf() string datatype in following functions: - cmos_write() - beep_write() - volume_writter(). Change from 'unsigned int *' to 'int *' Signed-off-by: Luis G.F <luisgf@xxxxxxxxx> --- drivers/platform/x86/thinkpad_acpi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index defb6af..1646300 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -4962,7 +4962,7 @@ static int cmos_write(char *buf) int cmos_cmd, res; while ((cmd = next_cmd(&buf))) { - if (sscanf(cmd, "%u", &cmos_cmd) == 1 && + if (sscanf(cmd, "%d", &cmos_cmd) == 1 && cmos_cmd >= 0 && cmos_cmd <= 21) { /* cmos_cmd set */ } else @@ -5467,7 +5467,7 @@ static int beep_write(char *buf) return -ENODEV; while ((cmd = next_cmd(&buf))) { - if (sscanf(cmd, "%u", &beep_cmd) == 1 && + if (sscanf(cmd, "%d", &beep_cmd) == 1 && beep_cmd >= 0 && beep_cmd <= 17) { /* beep_cmd set */ } else @@ -7047,7 +7047,7 @@ static int volume_write(char *buf) else if (new_level > 0) new_level--; continue; - } else if (sscanf(cmd, "level %u", &l) == 1 && + } else if (sscanf(cmd, "level %d", &l) == 1 && l >= 0 && l <= TP_EC_VOLUME_MAX) { new_level = l; continue; -- 1.8.4.5 -- To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html