aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2009-04-22 00:41:27 -0400
committerLen Brown <len.brown@intel.com>2009-05-27 00:30:49 -0400
commit35d7c1cfe5262480d3d8e6ccd7e4caf3a9c8ab39 (patch)
tree6657fe283ca7a2cccdc38e490fca802fba8d39a8 /include/acpi
parent10b6575b5d84d21e2eab01df2284288e5fdf7887 (diff)
ACPICA: Cleanup byte/word/dword extraction macros, fix possible warnings
Removed unnecessary masking. For the 64-bit macros, removed the structure overlay. Fixes aliasing warnings seen with gcc 4+ compilers. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/actypes.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index f555d927f7c0..37ba576d06e8 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -429,20 +429,12 @@ typedef unsigned long long acpi_integer;
429 429
430/* Data manipulation */ 430/* Data manipulation */
431 431
432#define ACPI_LOWORD(l) ((u16)(u32)(l)) 432#define ACPI_LOBYTE(integer) ((u8) (u16)(integer))
433#define ACPI_HIWORD(l) ((u16)((((u32)(l)) >> 16) & 0xFFFF)) 433#define ACPI_HIBYTE(integer) ((u8) (((u16)(integer)) >> 8))
434#define ACPI_LOBYTE(l) ((u8)(u16)(l)) 434#define ACPI_LOWORD(integer) ((u16) (u32)(integer))
435#define ACPI_HIBYTE(l) ((u8)((((u16)(l)) >> 8) & 0xFF)) 435#define ACPI_HIWORD(integer) ((u16)(((u32)(integer)) >> 16))
436 436#define ACPI_LODWORD(integer64) ((u32) (u64)(integer64))
437/* Full 64-bit integer must be available on both 32-bit and 64-bit platforms */ 437#define ACPI_HIDWORD(integer64) ((u32)(((u64)(integer64)) >> 32))
438
439struct acpi_integer_overlay {
440 u32 lo_dword;
441 u32 hi_dword;
442};
443
444#define ACPI_LODWORD(integer) (ACPI_CAST_PTR (struct acpi_integer_overlay, &integer)->lo_dword)
445#define ACPI_HIDWORD(integer) (ACPI_CAST_PTR (struct acpi_integer_overlay, &integer)->hi_dword)
446 438
447#define ACPI_SET_BIT(target,bit) ((target) |= (bit)) 439#define ACPI_SET_BIT(target,bit) ((target) |= (bit))
448#define ACPI_CLEAR_BIT(target,bit) ((target) &= ~(bit)) 440#define ACPI_CLEAR_BIT(target,bit) ((target) &= ~(bit))