diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-03-16 02:54:45 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-03-16 02:54:45 +0300 |
commit | 245f0db0de926601353776085e6f6a4c974c5615 (patch) | |
tree | b493e9e726f4a898041f7861d0df328aa1a348a1 /drivers/acpi/acpica/utprint.c | |
parent | 24672bdfb357b91bed0ea8d432241bf7bdefc8a8 (diff) | |
parent | b562e44f507e863c6792946e4e1b1449fbbac85d (diff) | |
download | linux-245f0db0de926601353776085e6f6a4c974c5615.tar.xz |
Merge tag 'v4.5' into next
Merge with Linux 4.5 to get PROPERTY_ENTRY_INTEGER() that is needed to
fix pxa/raumfeld rotary encoder properties.
Diffstat (limited to 'drivers/acpi/acpica/utprint.c')
-rw-r--r-- | drivers/acpi/acpica/utprint.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/acpi/acpica/utprint.c b/drivers/acpi/acpica/utprint.c index b26297c5de49..8c218ad787cd 100644 --- a/drivers/acpi/acpica/utprint.c +++ b/drivers/acpi/acpica/utprint.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2015, Intel Corp. + * Copyright (C) 2000 - 2016, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -314,8 +314,9 @@ static char *acpi_ut_format_number(char *string, if (need_prefix) { string = acpi_ut_bound_string_output(string, end, '0'); if (base == 16) { - string = acpi_ut_bound_string_output(string, end, - upper ? 'X' : 'x'); + string = + acpi_ut_bound_string_output(string, end, + upper ? 'X' : 'x'); } } if (!(type & ACPI_FORMAT_LEFT)) { @@ -400,6 +401,7 @@ acpi_ut_vsnprintf(char *string, } else { break; } + } while (1); /* Process width */ @@ -429,6 +431,7 @@ acpi_ut_vsnprintf(char *string, ++format; precision = va_arg(args, int); } + if (precision < 0) { precision = 0; } @@ -488,10 +491,12 @@ acpi_ut_vsnprintf(char *string, ' '); } } + for (i = 0; i < length; ++i) { pos = acpi_ut_bound_string_output(pos, end, *s); ++s; } + while (length < width--) { pos = acpi_ut_bound_string_output(pos, end, ' '); @@ -529,9 +534,9 @@ acpi_ut_vsnprintf(char *string, } p = va_arg(args, void *); - pos = acpi_ut_format_number(pos, end, - ACPI_TO_INTEGER(p), 16, - width, precision, type); + pos = + acpi_ut_format_number(pos, end, ACPI_TO_INTEGER(p), + 16, width, precision, type); continue; default: |