WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Fix format warning for drivers/xen/blktap/device.c for x

To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Subject: Re: [Xen-devel] Fix format warning for drivers/xen/blktap/device.c for xen/stable-2.6.32.x pvops commit 6c72eadd151f6f1b904989532a83988af0ea661a
From: Teck Choon Giam <giamteckchoon@xxxxxxxxx>
Date: Tue, 2 Nov 2010 21:50:11 +0800
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 02 Nov 2010 06:51:34 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=5RIsoPPpjIKf/ioOX8jK3e+ZyJrzTSNfc8PwLyCpIlw=; b=Tsv/OtuwBKIOQdPr6gjzSCfb9PD+0tLv5CQPsyHdJvRXS6oAgNSobwxnQuv58YEL4V nCK/Cy9y+qU9vveiXpdH0C9KWecDPNRODXE8PX59Ayc7v68XWWyeGb+PrGjQ4ekLnBk0 gSMQwF4nxm9lzN5TCnfbEiEYn3kggGlJ9nsfI=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=pS1q9D4pGmWvSLynvD1U9+WKrwDnxCKHJEJjJpuWs9BRH+dBtqZ5+BSVjv9n7nfioU Wo5jSnJpzRHYZTob5l/SLC+Xkm9n/DKDv3M+/r3HoKnDfMoCdm0mt3Bee2hTx5vU/wKU scE8sbSh3eQBQaQ7qnWcjpbItgXHk6en23BJk=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTikpuqv9suwcjgxsAq4yVsz6cQDY_8Rnjd+FK75Z@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <AANLkTikO3iFaof1LWmBONuAJP-4rnNtNq3nYzKiNiPF6@xxxxxxxxxxxxxx> <1288606527.13236.4365.camel@xxxxxxxxxxxxxxxxxxxxxx> <AANLkTikpuqv9suwcjgxsAq4yVsz6cQDY_8Rnjd+FK75Z@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
From: Giam Teck Choon <giamteckchoon@xxxxxxxxx>

Fix compilation format warning in drivers/xen/blktap/device.c

drivers/xen/blktap/device.c: In function ‘blktap_device_create’:
drivers/xen/blktap/device.c:869: warning: format ‘%llu’ expects type
‘long long unsigned int’, but argument 5 has type ‘sector_t’
drivers/xen/blktap/device.c: In function ‘blktap_device_debug’:
drivers/xen/blktap/device.c:898: warning: format ‘%llu’ expects type
‘long long unsigned int’, but argument 4 has type ‘sector_t’

Signed-off-by: Giam Teck Choon <giamteckchoon@xxxxxxxxx>
---
 drivers/xen/blktap/device.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/xen/blktap/device.c b/drivers/xen/blktap/device.c
index e4fc23e..8f1d3a9 100644
--- a/drivers/xen/blktap/device.c
+++ b/drivers/xen/blktap/device.c
@@ -867,7 +867,8 @@ blktap_device_create(struct blktap *tap, struct
blktap_params *params)
        set_bit(BLKTAP_DEVICE, &tap->dev_inuse);

        dev_info(disk_to_dev(gd), "sector-size: %u capacity: %llu\n",
-                queue_logical_block_size(rq), get_capacity(gd));
+                queue_logical_block_size(rq),
+                (unsigned long long)get_capacity(gd));

        return 0;

@@ -895,7 +896,8 @@ blktap_device_debug(struct blktap *tap, char *buf,
size_t size)

        s += snprintf(s, end - s,
                      "disk capacity:%llu sector size:%u\n",
-                     get_capacity(disk), queue_logical_block_size(q));
+                     (unsigned long long)get_capacity(disk),
+                     queue_logical_block_size(q));

        s += snprintf(s, end - s,
                      "queue flags:%#lx plugged:%d stopped:%d empty:%d\n",

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel