From patchwork Sun Sep 5 11:23:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Bishara X-Patchwork-Id: 63823 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 194CBB70F4 for ; Sun, 5 Sep 2010 21:25:27 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1OsDJf-0000uG-VM; Sun, 05 Sep 2010 11:23:20 +0000 Received: from dakia2.marvell.com ([65.219.4.35]) by bombadil.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1OsDJc-0000o8-6n for linux-mtd@lists.infradead.org; Sun, 05 Sep 2010 11:23:16 +0000 X-ASG-Debug-ID: 1283685792-081930780001-6YE7NY Received: from maili.marvell.com (maili.marvell.com [10.68.76.51]) by dakia2.marvell.com with ESMTP id tz75EfLAJuTxm8ZR for ; Sun, 05 Sep 2010 04:23:12 -0700 (PDT) X-Barracuda-Envelope-From: saeed@marvell.com Received: from localhost.localdomain (unknown [10.4.50.11]) by maili.marvell.com (Postfix) with ESMTP id 621888A001; Sun, 5 Sep 2010 04:23:11 -0700 (PDT) From: Saeed Bishara To: linux-mtd@lists.infradead.org X-ASG-Orig-Subj: [PATCH] cmd line partitions: use 64 bit variables to detect partitions/offsets larger than 4G. Subject: [PATCH] cmd line partitions: use 64 bit variables to detect partitions/offsets larger than 4G. Date: Sun, 5 Sep 2010 14:23:10 +0300 X-ASG-Orig-Subj: [PATCH] cmd line partitions: use 64 bit variables to detect partitions/offsets larger than 4G. Message-Id: <1283685790-8619-1-git-send-email-saeed@marvell.com> X-Mailer: git-send-email 1.6.0.4 X-Barracuda-Connect: maili.marvell.com[10.68.76.51] X-Barracuda-Start-Time: 1283685792 X-Barracuda-URL: http://10.68.76.222:80/cgi-mod/mark.cgi X-Barracuda-Spam-Score: -1002.00 X-Barracuda-Spam-Status: No, SCORE=-1002.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1000.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20100905_072316_349318_92059535 X-CRM114-Status: GOOD ( 14.74 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: Saeed Bishara X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Signed-off-by: Saeed Bishara --- drivers/mtd/cmdlinepart.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c index 1479da6..ae56c23 100644 --- a/drivers/mtd/cmdlinepart.c +++ b/drivers/mtd/cmdlinepart.c @@ -41,8 +41,8 @@ /* special size referring to all the remaining space in a partition */ -#define SIZE_REMAINING UINT_MAX -#define OFFSET_CONTINUOUS UINT_MAX +#define SIZE_REMAINING LLONG_MAX +#define OFFSET_CONTINUOUS LLONG_MAX struct cmdline_mtd_partition { struct cmdline_mtd_partition *next; @@ -74,8 +74,8 @@ static struct mtd_partition * newpart(char *s, int extra_mem_size) { struct mtd_partition *parts; - unsigned long size; - unsigned long offset = OFFSET_CONTINUOUS; + unsigned long long size; + unsigned long long offset = OFFSET_CONTINUOUS; char *name; int name_len; unsigned char *extra_mem; @@ -93,7 +93,7 @@ static struct mtd_partition * newpart(char *s, size = memparse(s, &s); if (size < PAGE_SIZE) { - printk(KERN_ERR ERRP "partition size too small (%lx)\n", size); + printk(KERN_ERR ERRP "partition size too small (%llx)\n", size); return NULL; } }