]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
virtio_balloon-introduce-migration-primitives-to-balloon-pages-fix-fix-fix
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 29 Nov 2012 03:17:26 +0000 (14:17 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 5 Dec 2012 05:23:10 +0000 (16:23 +1100)
drivers/virtio/virtio_balloon.c: In function 'fill_balloon':
drivers/virtio/virtio_balloon.c:142:4: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'long unsigned int' [-Wformat]

The type of PAGE_SIZE is different on different architectures (or at
least, it used to be).  Make things predictable.

Cc: Rafael Aquini <aquini@redhat.com>
Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/virtio/virtio_balloon.c

index 99ba6c69139f056667a14168bcce08c3071655b3..7363084072519bfca7e85b761f4238fbe5f61678 100644 (file)
@@ -34,7 +34,7 @@
  * multiple balloon pages.  All memory counters in this driver are in balloon
  * page units.
  */
-#define VIRTIO_BALLOON_PAGES_PER_PAGE (PAGE_SIZE >> VIRTIO_BALLOON_PFN_SHIFT)
+#define VIRTIO_BALLOON_PAGES_PER_PAGE (unsigned)(PAGE_SIZE >> VIRTIO_BALLOON_PFN_SHIFT)
 #define VIRTIO_BALLOON_ARRAY_PFNS_MAX 256
 
 struct virtio_balloon
@@ -140,7 +140,7 @@ static void fill_balloon(struct virtio_balloon *vb, size_t num)
 
                if (!page) {
                        dev_info_ratelimited(&vb->vdev->dev,
-                                            "Out of puff! Can't get %zu pages\n",
+                                          "Out of puff! Can't get %u pages\n",
                                             VIRTIO_BALLOON_PAGES_PER_PAGE);
                        /* Sleep for at least 1/5 of a second before retry. */
                        msleep(200);