From 55607952d309b4670b19f124db7e9b80a9c64f38 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 29 Nov 2012 14:17:26 +1100 Subject: [PATCH] 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 --- drivers/virtio/virtio_balloon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.39.5