ACPICA: Macros: remove pointer math on a null pointer

ACPICA commit 02bbca5070e42d298c9b824300aa0eb8a082d797

Causes warnings on some compilers and/or tools.
Changed ACPI_TO_POINTER to use ACPI_CAST_PTR instead of using
arithmetic.

Link: https://github.com/acpica/acpica/commit/02bbca50
Reported-by: Qian Cai <cai@lca.pw>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Bob Moore 2019-08-16 14:43:22 -07:00 коммит произвёл Rafael J. Wysocki
Родитель 67a72420a3
Коммит 779cc7ce3d
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -506,7 +506,7 @@ typedef u64 acpi_integer;
/* Pointer/Integer type conversions */
#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void, (void *) 0, (acpi_size) (i))
#define ACPI_TO_POINTER(i) ACPI_CAST_PTR (void, (acpi_size) (i))
#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p, (void *) 0)
#define ACPI_OFFSET(d, f) ACPI_PTR_DIFF (&(((d *) 0)->f), (void *) 0)
#define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i)