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>
This commit is contained in:
Joe Perches 2012-10-31 09:27:22 +10:30 committed by Rusty Russell
parent 0127f6855e
commit 800ba5eabf
1 changed files with 3 additions and 4 deletions

View File

@ -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;