diff options
author | Lv Zheng <lv.zheng@intel.com> | 2015-04-12 23:51:23 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-04-14 08:51:56 -0400 |
commit | cef9aaa764dafc7d9a1504dc70d3b4ea49aef87a (patch) | |
tree | 8c81e8bbece86d84534347c3ab077694fcb38186 /drivers/acpi/acpica | |
parent | a50edd4b72b4add7ad3b6e082deffafc88dd09e4 (diff) |
ACPICA: Fix a couple issues with the local printf module.
ACPICA commit 6853da4c0a99b49d62d6c58d22956cd6ff5759a9
The following commit has fixed local printf issue in width.prec:
Commit: 3589b8b8af6bdc3aafe520d76a73b77d965006b6
Subject: ACPICA: Utilities: Fix local printf issue.
But this commit only resets width/precision/quialifier to fix the reported
issue and doesn't fix other states issues. So now we still can see breakage
in format types and integer bases.
This patch resets format type/base states for local printf to fix this
issue. Lv Zheng.
Linux kernel is not affected by this patch as acpi_ut_vsnprintf() hasn't
been enabled in the kernel.
Link: https://github.com/acpica/acpica/commit/6853da4c
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica')
-rw-r--r-- | drivers/acpi/acpica/utprint.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/acpi/acpica/utprint.c b/drivers/acpi/acpica/utprint.c index 82ca9142e10d..2be6bd4bdc09 100644 --- a/drivers/acpi/acpica/utprint.c +++ b/drivers/acpi/acpica/utprint.c | |||
@@ -357,11 +357,11 @@ int | |||
357 | acpi_ut_vsnprintf(char *string, | 357 | acpi_ut_vsnprintf(char *string, |
358 | acpi_size size, const char *format, va_list args) | 358 | acpi_size size, const char *format, va_list args) |
359 | { | 359 | { |
360 | u8 base = 10; | 360 | u8 base; |
361 | u8 type = 0; | 361 | u8 type; |
362 | s32 width = -1; | 362 | s32 width; |
363 | s32 precision = -1; | 363 | s32 precision; |
364 | char qualifier = 0; | 364 | char qualifier; |
365 | u64 number; | 365 | u64 number; |
366 | char *pos; | 366 | char *pos; |
367 | char *end; | 367 | char *end; |
@@ -380,6 +380,9 @@ acpi_ut_vsnprintf(char *string, | |||
380 | continue; | 380 | continue; |
381 | } | 381 | } |
382 | 382 | ||
383 | type = 0; | ||
384 | base = 10; | ||
385 | |||
383 | /* Process sign */ | 386 | /* Process sign */ |
384 | 387 | ||
385 | do { | 388 | do { |