projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0cff8dc
)
ACPICA: ACPI 6.0: Add ACPI_SUB_PTR().
author
Lv Zheng
<
[email protected]
>
Thu, 21 May 2015 02:31:24 +0000
(10:31 +0800)
committer
Rafael J. Wysocki
<
[email protected]
>
Fri, 22 May 2015 01:22:20 +0000
(
03:22
+0200)
ACPICA commit
5de82757aef5d6163e37064033aacbce193abbca
Using a minus number with ACPI_ADD_PTR() will cause compiler warnings, such
warnings cannot be eliminated by force casting an unsigned value to a
signed value. This patch thus introduces ACPI_SUB_PTR() to be used with
minus numbers. Lv Zheng.
Link:
https://github.com/acpica/acpica/commit/5de82757
Signed-off-by: Lv Zheng <
[email protected]
>
Signed-off-by: Bob Moore <
[email protected]
>
Signed-off-by: Rafael J. Wysocki <
[email protected]
>
include/acpi/actypes.h
patch
|
blob
|
history
diff --git
a/include/acpi/actypes.h
b/include/acpi/actypes.h
index a9d33e8c33b7dceb340c6e106a0f72c5652315cd..63fd7f5e9fb3495198e659c8b04a16db2e489877 100644
(file)
--- a/
include/acpi/actypes.h
+++ b/
include/acpi/actypes.h
@@
-525,6
+525,7
@@
typedef u64 acpi_integer;
#define ACPI_CAST_PTR(t, p) ((t *) (acpi_uintptr_t) (p))
#define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (acpi_uintptr_t) (p))
#define ACPI_ADD_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8, (a)) + (acpi_size)(b)))
+#define ACPI_SUB_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8, (a)) - (acpi_size)(b)))
#define ACPI_PTR_DIFF(a, b) (acpi_size) (ACPI_CAST_PTR (u8, (a)) - ACPI_CAST_PTR (u8, (b)))
/* Pointer/Integer type conversions */