From: Andrew Morton Date: Thu, 29 Nov 2012 03:17:26 +0000 (+1100) Subject: virtio_balloon-introduce-migration-primitives-to-balloon-pages-fix-fix-fix X-Git-Tag: next-20121205~1^2~300 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=55607952d309b4670b19f124db7e9b80a9c64f38;p=karo-tx-linux.git virtio_balloon-introduce-migration-primitives-to-balloon-pages-fix-fix-fix 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 Cc: Wei Yongjun Signed-off-by: Andrew Morton --- diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 99ba6c69139f..736308407251 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -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);