Re: [PATCH 1/2] virtio-scsi: use pr_err() instead of printk()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
> 
> Acked-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>

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

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux