From 8884de6a47dda88f8fdf4efa9960149fb5a8a46f Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Wed, 30 Jul 2014 12:20:26 +0800 Subject: [PATCH] ACPICA: Work around an ancient GCC bug. warning: cast from function call of type 'char *' to non-matching type 'long unsigned int' Since acpi_ut_format_number() hasn't been enabled for the Linux kernel, this patch doesn't affect the Linux kernel. Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/utprint.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/acpica/utprint.c b/drivers/acpi/acpica/utprint.c index 10311648f701..080e22aaba15 100644 --- a/drivers/acpi/acpica/utprint.c +++ b/drivers/acpi/acpica/utprint.c @@ -242,6 +242,7 @@ static char *acpi_ut_format_number(char *string, u64 number, u8 base, s32 width, s32 precision, u8 type) { + char *pos; char sign; char zero; u8 need_prefix; @@ -289,9 +290,8 @@ static char *acpi_ut_format_number(char *string, /* Generate full string in reverse order */ - i = ACPI_PTR_DIFF(acpi_ut_put_number - (reversed_string, number, base, upper), - reversed_string); + pos = acpi_ut_put_number(reversed_string, number, base, upper); + i = ACPI_PTR_DIFF(pos, reversed_string); /* Printing 100 using %2d gives "100", not "00" */ -- 2.11.0