Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/udl: dma-buf: Constify dma_buf_ops structures.

dma_buf_ops are not supposed to change at runtime. All functions
working with dma_buf_ops provided by <linux/dma-buf.h> work with
const dma_buf_ops. So mark the non-const structs as const.

File size before:
text data bss dec hex filename
2002 112 0 2114 842 drivers/gpu/drm/udl/udl_dmabuf.o

File size After adding 'const':
text data bss dec hex filename
2114 0 0 2114 842 drivers/gpu/drm/udl/udl_dmabuf.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/cb4dfac90e85e2270779331f8cb10b635042bad7.1498912415.git.arvind.yadav.cs@gmail.com

authored by

Arvind Yadav and committed by
Daniel Vetter
7b4e1eaa 8a63ca58

+1 -1
+1 -1
drivers/gpu/drm/udl/udl_dmabuf.c
··· 186 186 return -EINVAL; 187 187 } 188 188 189 - static struct dma_buf_ops udl_dmabuf_ops = { 189 + static const struct dma_buf_ops udl_dmabuf_ops = { 190 190 .attach = udl_attach_dma_buf, 191 191 .detach = udl_detach_dma_buf, 192 192 .map_dma_buf = udl_map_dma_buf,