From: William Lee Irwin III <wli@holomorphy.com>
To: andrew.grover@intel.com
Cc: linux-kernel@vger.kernel.org
Subject: ACPI constant overflow fixes
Date: Thu, 22 May 2003 08:51:02 -0700 [thread overview]
Message-ID: <20030522155102.GQ2444@holomorphy.com> (raw)
diff -prauN mm8-2.5.69-1/include/acpi/actypes.h mm8-2.5.69-2/include/acpi/actypes.h
--- mm8-2.5.69-1/include/acpi/actypes.h 2003-05-04 16:53:32.000000000 -0700
+++ mm8-2.5.69-2/include/acpi/actypes.h 2003-05-22 08:14:24.000000000 -0700
@@ -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
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
reply other threads:[~2003-05-22 15:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030522155102.GQ2444@holomorphy.com \
--to=wli@holomorphy.com \
--cc=andrew.grover@intel.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox