mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 01:04:08 +08:00
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:
parent
0127f6855e
commit
800ba5eabf
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user