Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 800ba5ea authored by Joe Perches's avatar Joe Perches Committed by Rusty Russell
Browse files

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 0127f685
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -130,8 +130,7 @@ static void fill_balloon(struct virtio_balloon *vb, size_t num)
		struct page *page = alloc_page(GFP_HIGHUSER | __GFP_NORETRY |
		struct page *page = alloc_page(GFP_HIGHUSER | __GFP_NORETRY |
					__GFP_NOMEMALLOC | __GFP_NOWARN);
					__GFP_NOMEMALLOC | __GFP_NOWARN);
		if (!page) {
		if (!page) {
			if (printk_ratelimit())
			dev_info_ratelimited(&vb->vdev->dev,
				dev_printk(KERN_INFO, &vb->vdev->dev,
					     "Out of puff! Can't get %zu pages\n",
					     "Out of puff! Can't get %zu pages\n",
					     num);
					     num);
			/* Sleep for at least 1/5 of a second before retry. */
			/* Sleep for at least 1/5 of a second before retry. */