From patchwork Tue Aug 2 22:05:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 1030192 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p72M5Bg1002162 for ; Tue, 2 Aug 2011 22:05:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755397Ab1HBWFK (ORCPT ); Tue, 2 Aug 2011 18:05:10 -0400 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 Received: from localhost.localdomain ([unknown] [65.175.195.226]) by vms173019.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LPB004X8MODUNQ0@vms173019.mailsrvcs.net>; Tue, 02 Aug 2011 17:05:02 -0500 (CDT) Received: from localhost.localdomain (x980 [127.0.0.1]) by localhost.localdomain (8.14.4/8.14.4) with ESMTP id p72M50KW002712; Tue, 02 Aug 2011 18:05:00 -0400 Received: from localhost (lenb@localhost) by localhost.localdomain (8.14.4/8.14.4/Submit) with ESMTP id p72M50vS002700; Tue, 02 Aug 2011 18:05:00 -0400 X-Authentication-warning: localhost.localdomain: lenb owned process doing -bs Date: Tue, 02 Aug 2011 18:05:00 -0400 (EDT) From: Len Brown X-X-Sender: lenb@x980 To: Randy Dunlap Cc: linux-acpi@vger.kernel.org, Stephen Rothwell , linux-next@vger.kernel.org, LKML , Huang Ying Subject: Re: linux-next: Tree for July 20 (acpi/apei/ghes) In-reply-to: <20110720093829.aae2ec63.rdunlap@xenotime.net> Message-id: References: <20110720180041.5774ca335e6697c17374dca5@canb.auug.org.au> <20110720093633.ca9cf794.rdunlap@xenotime.net> <20110720093829.aae2ec63.rdunlap@xenotime.net> User-Agent: Alpine 2.02 (LFD 1266 2009-07-14) MIME-version: 1.0 Content-type: MULTIPART/MIXED; BOUNDARY="8323328-1257865506-1312322700=:25237" Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 02 Aug 2011 22:05:11 +0000 (UTC) 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;