diff options
author | Bob Moore <robert.moore@intel.com> | 2019-08-16 17:43:22 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-08-20 18:00:36 -0400 |
commit | 779cc7ce3dc519b05f274b79fb5a6c1703f373b5 (patch) | |
tree | 00edfeb5093adade55736ecdf4074a7b8c5c9a47 | |
parent | 67a72420a326b45514deb3f212085fb2cd1595b5 (diff) |
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; | |||
506 | 506 | ||
507 | /* Pointer/Integer type conversions */ | 507 | /* Pointer/Integer type conversions */ |
508 | 508 | ||
509 | #define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void, (void *) 0, (acpi_size) (i)) | 509 | #define ACPI_TO_POINTER(i) ACPI_CAST_PTR (void, (acpi_size) (i)) |
510 | #define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p, (void *) 0) | 510 | #define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p, (void *) 0) |
511 | #define ACPI_OFFSET(d, f) ACPI_PTR_DIFF (&(((d *) 0)->f), (void *) 0) | 511 | #define ACPI_OFFSET(d, f) ACPI_PTR_DIFF (&(((d *) 0)->f), (void *) 0) |
512 | #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) | 512 | #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) |