summaryrefslogtreecommitdiffstats
path: root/drivers/virtio/virtio_balloon.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-10-31 09:27:22 +1030
committerRusty Russell <rusty@rustcorp.com.au>2012-12-18 15:20:40 +1030
commit800ba5eabf13485fecbf468f6b2999608413d176 (patch)
tree3c7cc21de8896fbbf874824f92b9353f9b6141af /drivers/virtio/virtio_balloon.c
parent0127f6855e643c6b8fd5fbe3b5fa23c9d26cd237 (diff)
downloadtalos-op-linux-800ba5eabf13485fecbf468f6b2999608413d176.tar.gz
talos-op-linux-800ba5eabf13485fecbf468f6b2999608413d176.zip
virtio: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
dev_<level> calls take less code than dev_printk(KERN_<LEVEL> and reducing object size is good. Convert if (printk_ratelimit()) dev_printk to dev_<level>_ratelimited. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/virtio/virtio_balloon.c')
-rw-r--r--drivers/virtio/virtio_balloon.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 0908e6044333..586395cca5fe 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -130,10 +130,9 @@ static void fill_balloon(struct virtio_balloon *vb, size_t num)
struct page *page = alloc_page(GFP_HIGHUSER | __GFP_NORETRY |
__GFP_NOMEMALLOC | __GFP_NOWARN);
if (!page) {
- if (printk_ratelimit())
- dev_printk(KERN_INFO, &vb->vdev->dev,
- "Out of puff! Can't get %zu pages\n",
- num);
+ dev_info_ratelimited(&vb->vdev->dev,
+ "Out of puff! Can't get %zu pages\n",
+ num);
/* Sleep for at least 1/5 of a second before retry. */
msleep(200);
break;
OpenPOWER on IntegriCloud