From mboxrd@z Thu Jan 1 00:00:00 1970 From: Len Brown Subject: Re: linux-next: Tree for July 20 (acpi/apei/ghes) Date: Tue, 02 Aug 2011 18:05:00 -0400 (EDT) Message-ID: References: <20110720180041.5774ca335e6697c17374dca5@canb.auug.org.au> <20110720093633.ca9cf794.rdunlap@xenotime.net> <20110720093829.aae2ec63.rdunlap@xenotime.net> Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1257865506-1312322700=:25237" Return-path: Received: from vms173019pub.verizon.net ([206.46.173.19]:34910 "EHLO vms173019pub.verizon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755390Ab1HBWFJ (ORCPT ); Tue, 2 Aug 2011 18:05:09 -0400 In-reply-to: <20110720093829.aae2ec63.rdunlap@xenotime.net> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Randy Dunlap Cc: linux-acpi@vger.kernel.org, Stephen Rothwell , linux-next@vger.kernel.org, LKML , Huang Ying This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1257865506-1312322700=:25237 Content-Type: TEXT/PLAIN; charset=ISO-8859-15 Content-Transfer-Encoding: 8BIT From: Len Brown Subject: [PATCH] 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 Signed-off-by: Len Brown --- drivers/acpi/apei/ghes.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index e92c47c..0784f99 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; -- 1.7.6.396.ge0613 --8323328-1257865506-1312322700=:25237--