projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a37c49
)
gpu/drm/virtio/virtgpu_vq.c: Use kmem_cache_zalloc
author
Sabyasachi Gupta
<sabyasachi.linux@gmail.com>
Fri, 19 Oct 2018 15:59:54 +0000
(21:29 +0530)
committer
Gerd Hoffmann
<kraxel@redhat.com>
Tue, 30 Oct 2018 06:19:58 +0000
(07:19 +0100)
Replaced kmem_cache_alloc + memset with kmem_cache_zalloc
Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link:
http://patchwork.freedesktop.org/patch/msgid/5bc9ff7e.1c69fb81.105c2.1fef@mx.google.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_vq.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/virtio/virtgpu_vq.c
b/drivers/gpu/drm/virtio/virtgpu_vq.c
index d2861da2bbc9445aebca01733d0ef5babb7ecb4f..51bef1775e475a84282fcd1be203323fb58ea4cb 100644
(file)
--- a/
drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/
drivers/gpu/drm/virtio/virtgpu_vq.c
@@
-78,10
+78,9
@@
virtio_gpu_get_vbuf(struct virtio_gpu_device *vgdev,
{
struct virtio_gpu_vbuffer *vbuf;
- vbuf = kmem_cache_alloc(vgdev->vbufs, GFP_KERNEL);
+ vbuf = kmem_cache_
z
alloc(vgdev->vbufs, GFP_KERNEL);
if (!vbuf)
return ERR_PTR(-ENOMEM);
- memset(vbuf, 0, VBUFFER_SIZE);
BUG_ON(size > MAX_INLINE_CMD_SIZE);
vbuf->buf = (void *)vbuf + sizeof(*vbuf);