From patchwork Fri May 28 16:46:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 53918 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2EE09B7D1F for ; Sat, 29 May 2010 03:00:43 +1000 (EST) Received: from localhost ([127.0.0.1]:43548 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OI2vI-0000Zt-Dx for incoming@patchwork.ozlabs.org; Fri, 28 May 2010 13:00:40 -0400 Received: from [140.186.70.92] (port=59097 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OI2hx-0007Uo-D1 for qemu-devel@nongnu.org; Fri, 28 May 2010 12:46:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OI2hw-0008HY-3N for qemu-devel@nongnu.org; Fri, 28 May 2010 12:46:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53130) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OI2hv-0008HQ-TB for qemu-devel@nongnu.org; Fri, 28 May 2010 12:46:52 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4SGknBY028953 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 28 May 2010 12:46:49 -0400 Received: from localhost.localdomain (vpn1-4-101.ams2.redhat.com [10.36.4.101]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4SGkTgd018145; Fri, 28 May 2010 12:46:48 -0400 From: Kevin Wolf To: anthony@codemonkey.ws Date: Fri, 28 May 2010 18:46:07 +0200 Message-Id: <1275065173-24045-9-git-send-email-kwolf@redhat.com> In-Reply-To: <1275065173-24045-1-git-send-email-kwolf@redhat.com> References: <1275065173-24045-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 08/14] block.h: Make BDRV_SECTOR_SIZE 64 bit safe X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jes Sorensen C defaults to int, so make definition of BDRV_SECTOR_SIZE 64 bit safe as it and BDRV_SECTOR_MASK may be used against 64 bit addresses. Signed-off-by: Jes Sorensen Signed-off-by: Kevin Wolf --- block.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block.h b/block.h index 9034ebb..756670d 100644 --- a/block.h +++ b/block.h @@ -38,7 +38,7 @@ typedef struct QEMUSnapshotInfo { #define BDRV_O_CACHE_MASK (BDRV_O_NOCACHE | BDRV_O_CACHE_WB) #define BDRV_SECTOR_BITS 9 -#define BDRV_SECTOR_SIZE (1 << BDRV_SECTOR_BITS) +#define BDRV_SECTOR_SIZE (1ULL << BDRV_SECTOR_BITS) #define BDRV_SECTOR_MASK ~(BDRV_SECTOR_SIZE - 1) typedef enum {