Commit ba06d1e1 authored by Wanlong Gao's avatar Wanlong Gao Committed by Rusty Russell

virtio-scsi: use pr_err() instead of printk()

Convert the virtio-scsi driver to use pr_err() instead of printk().
Signed-off-by: default avatarWanlong Gao <gaowanlong@cn.fujitsu.com>
Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 289d1054
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
* *
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/mempool.h> #include <linux/mempool.h>
...@@ -794,8 +796,7 @@ static int __init init(void) ...@@ -794,8 +796,7 @@ static int __init init(void)
virtscsi_cmd_cache = KMEM_CACHE(virtio_scsi_cmd, 0); virtscsi_cmd_cache = KMEM_CACHE(virtio_scsi_cmd, 0);
if (!virtscsi_cmd_cache) { if (!virtscsi_cmd_cache) {
printk(KERN_ERR "kmem_cache_create() for " pr_err("kmem_cache_create() for virtscsi_cmd_cache failed\n");
"virtscsi_cmd_cache failed\n");
goto error; goto error;
} }
...@@ -804,8 +805,7 @@ static int __init init(void) ...@@ -804,8 +805,7 @@ static int __init init(void)
mempool_create_slab_pool(VIRTIO_SCSI_MEMPOOL_SZ, mempool_create_slab_pool(VIRTIO_SCSI_MEMPOOL_SZ,
virtscsi_cmd_cache); virtscsi_cmd_cache);
if (!virtscsi_cmd_pool) { if (!virtscsi_cmd_pool) {
printk(KERN_ERR "mempool_create() for" pr_err("mempool_create() for virtscsi_cmd_pool failed\n");
"virtscsi_cmd_pool failed\n");
goto error; goto error;
} }
ret = register_virtio_driver(&virtio_scsi_driver); ret = register_virtio_driver(&virtio_scsi_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment