From: Sjur Brændeland Date: Mon, 15 Oct 2012 07:57:34 +0000 (+0200) Subject: virtio_console: Use kmalloc instead of kzalloc X-Git-Tag: v3.8-rc1~28^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0127f6855e643c6b8fd5fbe3b5fa23c9d26cd237;p=platform%2Fupstream%2Fkernel-adaptation-pc.git virtio_console: Use kmalloc instead of kzalloc Avoid the more cpu expensive kzalloc when allocating buffers. Originally kzalloc was intended for isolating the guest from the host by not sending random guest data to the host. But device isolation is not yet in place so kzalloc is not really needed. Signed-off-by: Sjur Brændeland Signed-off-by: Rusty Russell --- diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 09d193d..eecb1f9 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -349,7 +349,7 @@ static struct port_buffer *alloc_buf(size_t buf_size) buf = kmalloc(sizeof(*buf), GFP_KERNEL); if (!buf) goto fail; - buf->buf = kzalloc(buf_size, GFP_KERNEL); + buf->buf = kmalloc(buf_size, GFP_KERNEL); if (!buf->buf) goto free_buf; buf->len = 0;