Browse Source

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>
Joe Perches 12 years ago
parent
commit
800ba5eabf
1 changed files with 3 additions and 4 deletions
  1. 3 4
      drivers/virtio/virtio_balloon.c

+ 3 - 4
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;