Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1680454 > unrolled thread

[PATCH] drm: constify drm_framebuffer_funcs.

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2017-07-03 17:40 +0200
Last post2017-07-03 17:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] drm: constify drm_framebuffer_funcs. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-03 17:40 +0200

#1680454 — [PATCH] drm: constify drm_framebuffer_funcs.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-07-03 17:40 +0200
Subject[PATCH] drm: constify drm_framebuffer_funcs.
Message-ID<tZbCa-3oO-23@gated-at.bofh.it>
drm_framebuffer_funcs are not supposed to change at runtime. So mark
the non-const structs as const.

File size before:
   text	   data	    bss	    dec	    hex	filename
   3978	    216	      0	   4194	   1062 drivers/gpu/drm/drm_fb_cma_helper.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
   4002	    184	      0	   4186	   105a drivers/gpu/drm/drm_fb_cma_helper.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/gpu/drm/drm_fb_cma_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c
index 50abd1f..134659e 100644
--- a/drivers/gpu/drm/drm_fb_cma_helper.c
+++ b/drivers/gpu/drm/drm_fb_cma_helper.c
@@ -120,7 +120,7 @@ int drm_fb_cma_create_handle(struct drm_framebuffer *fb,
 }
 EXPORT_SYMBOL(drm_fb_cma_create_handle);
 
-static struct drm_framebuffer_funcs drm_fb_cma_funcs = {
+static const struct drm_framebuffer_funcs drm_fb_cma_funcs = {
 	.destroy	= drm_fb_cma_destroy,
 	.create_handle	= drm_fb_cma_create_handle,
 };
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web