Skip to content

Commit

Permalink
virtio: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joe Perches authored and Rusty Russell committed Dec 18, 2012
1 parent 0127f68 commit 800ba5e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/virtio/virtio_balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 800ba5e

Please sign in to comment.