From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
To: Paolo Bonzini <pbonzini@redhat.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 18:00:14 +0800 [thread overview]
Message-ID: <5139B6AE.7050104@cn.fujitsu.com> (raw)
In-Reply-To: <5139B402.2030106@redhat.com>
On 03/08/2013 05:48 PM, Paolo Bonzini wrote:
> 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>
Thank you.
>
> 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.
OK, but I still think the original lines are untidy.
Thanks,
Wanlong Gao
>
> 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 10:00 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 ` [PATCH 1/2] virtio-scsi: use pr_err() instead of printk() Paolo Bonzini
2013-03-08 10:00 ` Wanlong Gao [this message]
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=5139B6AE.7050104@cn.fujitsu.com \
--to=gaowanlong@cn.fujitsu.com \
--cc=pbonzini@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.