From: Paolo Bonzini <pbonzini@redhat.com>
To: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Cc: virtualization@lists.linux-foundation.org
Subject: Re: [PATCH 1/2] virtio-scsi: use pr_err() instead of printk()
Date: Fri, 08 Mar 2013 10:48:50 +0100 [thread overview]
Message-ID: <5139B402.2030106@redhat.com> (raw)
In-Reply-To: <1362626968-16871-1-git-send-email-gaowanlong@cn.fujitsu.com>
Il 07/03/2013 04:29, Wanlong Gao ha scritto:
> Convert the virtio-scsi driver to use pr_err() instead of printk().
>
> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
to this patch only. For the other it's a matter of taste, and since
this is not a fast path it's easier to have a single label to bail out
out. If you want to change it to "out", that's fine.
Paolo
> ---
> drivers/scsi/virtio_scsi.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
> index 612e320..f679b8c 100644
> --- a/drivers/scsi/virtio_scsi.c
> +++ b/drivers/scsi/virtio_scsi.c
> @@ -13,6 +13,8 @@
> *
> */
>
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> #include <linux/module.h>
> #include <linux/slab.h>
> #include <linux/mempool.h>
> @@ -771,8 +773,7 @@ static int __init init(void)
>
> virtscsi_cmd_cache = KMEM_CACHE(virtio_scsi_cmd, 0);
> if (!virtscsi_cmd_cache) {
> - printk(KERN_ERR "kmem_cache_create() for "
> - "virtscsi_cmd_cache failed\n");
> + pr_err("kmem_cache_create() for virtscsi_cmd_cache failed\n");
> goto error;
> }
>
> @@ -781,8 +782,7 @@ static int __init init(void)
> mempool_create_slab_pool(VIRTIO_SCSI_MEMPOOL_SZ,
> virtscsi_cmd_cache);
> if (!virtscsi_cmd_pool) {
> - printk(KERN_ERR "mempool_create() for"
> - "virtscsi_cmd_pool failed\n");
> + pr_err("mempool_create() for virtscsi_cmd_pool failed\n");
> goto error;
> }
> ret = register_virtio_driver(&virtio_scsi_driver);
>
next prev parent reply other threads:[~2013-03-08 9:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-07 3:29 [PATCH 1/2] virtio-scsi: use pr_err() instead of printk() Wanlong Gao
2013-03-07 3:29 ` [PATCH 2/2] virtio-scsi: reorder the goto label in init() Wanlong Gao
2013-03-08 0:06 ` Rusty Russell
2013-03-08 1:11 ` [PATCH V2 " Wanlong Gao
2013-03-08 9:48 ` Paolo Bonzini [this message]
2013-03-08 10:00 ` [PATCH 1/2] virtio-scsi: use pr_err() instead of printk() Wanlong Gao
2013-03-12 3:43 ` Rusty Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5139B402.2030106@redhat.com \
--to=pbonzini@redhat.com \
--cc=gaowanlong@cn.fujitsu.com \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).