Commit 2de9a741 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ACPI constant overflow fixes

From: William Lee Irwin III <wli@holomorphy.com>

64-bit ACPI fixes
parent 1c9b29ce
......@@ -51,10 +51,10 @@
/*
* Data type ranges
*/
#define ACPI_UINT8_MAX (UINT8) 0xFF
#define ACPI_UINT16_MAX (UINT16) 0xFFFF
#define ACPI_UINT32_MAX (UINT32) 0xFFFFFFFF
#define ACPI_UINT64_MAX (UINT64) 0xFFFFFFFFFFFFFFFF
#define ACPI_UINT8_MAX (~((UINT8) 0))
#define ACPI_UINT16_MAX (~((UINT16) 0))
#define ACPI_UINT32_MAX (~((UINT32) 0))
#define ACPI_UINT64_MAX (~((UINT64) 0))
#define ACPI_ASCII_MAX 0x7F
......@@ -313,7 +313,11 @@ typedef u32 acpi_integer;
typedef u64 acpi_integer;
#define ACPI_INTEGER_MAX ACPI_UINT64_MAX
#define ACPI_INTEGER_BIT_SIZE 64
#define ACPI_MAX_BCD_VALUE 9999999999999999
#if ACPI_MACHINE_WIDTH == 64
#define ACPI_MAX_BCD_VALUE 9999999999999999UL
#else
#define ACPI_MAX_BCD_VALUE 9999999999999999ULL
#endif
#define ACPI_MAX_BCD_DIGITS 16
#define ACPI_MAX_DECIMAL_DIGITS 19
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment