diff options
author | Bob Moore <robert.moore@intel.com> | 2019-08-16 14:43:22 -0700 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-08-21 00:00:36 +0200 |
commit | 779cc7ce3dc519b05f274b79fb5a6c1703f373b5 (patch) | |
tree | 00edfeb5093adade55736ecdf4074a7b8c5c9a47 | |
parent | 67a72420a326b45514deb3f212085fb2cd1595b5 (diff) | |
download | linux-779cc7ce3dc519b05f274b79fb5a6c1703f373b5.tar.bz2 |
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>
-rw-r--r-- | include/acpi/actypes.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index e31ef75a22a1..f52c83eaedc4 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -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) |