diff options
author | Bob Moore <robert.moore@intel.com> | 2016-09-07 09:14:30 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-09-10 03:37:59 +0300 |
commit | 5ebd2eaaefc0d4fe37ab72e716e1b8065ed4206c (patch) | |
tree | 36563f7c5e47e58b2d0fe5624f135a19dfbd3c33 /drivers/acpi/acpica/exconvrt.c | |
parent | 60361b75848c8614233e3374ef5a0056527f0385 (diff) | |
download | linux-5ebd2eaaefc0d4fe37ab72e716e1b8065ed4206c.tar.xz |
ACPICA: Cleanup for all string-to-integer conversions
ACPICA commit e2e72a351201fd58e4694418859ae2c247dafca0
Consolidate multiple versions of strtoul64 to one common version.
limit possible bases to either 10 or 16.
Handles both implicit and explicit conversions.
Added a 2-character ascii-to-hex function for GPEs and buffers.
Adds a new file, utstrtoul64.c
Link: https://github.com/acpica/acpica/commit/e2e72a35
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/exconvrt.c')
-rw-r--r-- | drivers/acpi/acpica/exconvrt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/acpi/acpica/exconvrt.c b/drivers/acpi/acpica/exconvrt.c index b7e9b3d803e1..588ad1409dbe 100644 --- a/drivers/acpi/acpica/exconvrt.c +++ b/drivers/acpi/acpica/exconvrt.c @@ -124,9 +124,9 @@ acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc, * of ACPI 3.0) is that the to_integer() operator allows both decimal * and hexadecimal strings (hex prefixed with "0x"). */ - status = acpi_ut_strtoul64((char *)pointer, flags, - acpi_gbl_integer_byte_width, - &result); + status = acpi_ut_strtoul64(ACPI_CAST_PTR(char, pointer), + (acpi_gbl_integer_byte_width | + flags), &result); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -632,7 +632,7 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type, */ status = acpi_ex_convert_to_integer(source_desc, result_desc, - 16); + ACPI_STRTOUL_BASE16); break; case ACPI_TYPE_STRING: |