summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/apei
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2011-08-02 18:00:21 -0400
committerLen Brown <len.brown@intel.com>2011-08-03 11:15:59 -0400
commit70cb6e1da00db6c9212e6fd69bd96fd41c797077 (patch)
tree480a59919c5dcf22c742fb270b003194a4ae0378 /drivers/acpi/apei
parenta7e09d450b2e0b068e850d103b6ee1af537d1910 (diff)
APEI GHES: 32-bit buildfix
drivers/acpi/apei/ghes.c:542: warning: integer overflow in expression drivers/acpi/apei/ghes.c:619: warning: integer overflow in expression ghes.c:(.text+0x46289): undefined reference to `__udivdi3'   in function ghes_estatus_cache_add(). Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/apei')
-rw-r--r--drivers/acpi/apei/ghes.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index e92c47c46f9..0784f99a466 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -65,7 +65,7 @@
#define GHES_ESTATUS_CACHES_SIZE 4
-#define GHES_ESTATUS_IN_CACHE_MAX_NSEC (10 * NSEC_PER_SEC)
+#define GHES_ESTATUS_IN_CACHE_MAX_NSEC 10000000000ULL
/* Prevent too many caches are allocated because of RCU */
#define GHES_ESTATUS_CACHE_ALLOCED_MAX (GHES_ESTATUS_CACHES_SIZE * 3 / 2)
@@ -622,7 +622,8 @@ static void ghes_estatus_cache_add(
break;
}
count = atomic_read(&cache->count);
- period = duration / (count + 1);
+ period = duration;
+ do_div(period, (count + 1));
if (period > max_period) {
max_period = period;
slot = i;