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

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [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: Sat, 30 Oct 2010 21:04:54 +0800
Delivery-date: Sat, 30 Oct 2010 06:05:50 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=F4ww7S+koSwLAJjgM5U5/87DFJIF2MwYMiaaIBkS0BQ=; b=x5U0pCwQ5De6HegC4Aa1o/ITWGVtBWF3rD1TFWR2BEhKQOXUvt3YTYuzLcIXLyFu+x LB0OlPFEXzu7P2w+r0VaJw/BH0uMDTOQ3xlfMJZD+UdHtnPEPElM7m4fMHuC0lzbRnpr JmAtJWJfo7nJt/EAxZJL0phvIkcnfyapg+H8M=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=fxIo1bDHOeFv/7k3K0WJwvp2lrdoFt/F02QluxPXyKKetR7mAwvqsNqBZBImETHZ58 dGNc/zbugpgvWldGoZUKba7/580k1yEpJGD6Au1gT7v+5rUlubHEDOdpUqIRgVWX4yTg fiyyNlb4h5ZIWMWTc4SVQyGl5GTlaXGxmS94M=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

Anyone can check whether the below patch is fine?  Basically I just
cast the type accordingly and won't know it is right or not... ...

Fix below warnings with gcc version 4.1.2 20080704 (Red Hat 4.1.2-48):

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’

Patch below:

====================================================================

--- a/drivers/xen/blktap/device.c       2010-10-30 20:39:57.000000000 +0800
+++ b/drivers/xen/blktap/device.c       2010-10-30 20:43:08.000000000 +0800
@@ -867,7 +867,7 @@
        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 +895,7 @@

        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",


====================================================================

Thanks.

Kindest regards,
Giam Teck Choon

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Fix format warning for drivers/xen/blktap/device.c for xen/stable-2.6.32.x pvops commit 6c72eadd151f6f1b904989532a83988af0ea661a, Teck Choon Giam <=