public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] drm/sun4i : constify drm_plane_helper_funcs
@ 2017-07-03 16:05 Arvind Yadav
  2017-07-03 21:29 ` Maxime Ripard
  0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-07-03 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

drm_plane_helper_funcs are not supposed to change at runtime.
All functions working with drm_plane_helper_funcs provided by
<drm/drm_plane_helper.h> work with const drm_plane_helper_funcs.
So mark the non-const structs as const.

File size before:
   text	   data	    bss	    dec	    hex	filename
    981	     40	      0	   1021	    3fd drivers/gpu/drm/sun4i/sun4i_layer.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
   1021	      0	      0	   1021	    3fd drivers/gpu/drm/sun4i/sun4i_layer.o

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

diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c
index f26bde5..6191aac 100644
--- a/drivers/gpu/drm/sun4i/sun4i_layer.c
+++ b/drivers/gpu/drm/sun4i/sun4i_layer.c
@@ -52,7 +52,7 @@ static void sun4i_backend_layer_atomic_update(struct drm_plane *plane,
 	sun4i_backend_layer_enable(backend, layer->id, true);
 }
 
-static struct drm_plane_helper_funcs sun4i_backend_layer_helper_funcs = {
+static const struct drm_plane_helper_funcs sun4i_backend_layer_helper_funcs = {
 	.atomic_check	= sun4i_backend_layer_atomic_check,
 	.atomic_disable	= sun4i_backend_layer_atomic_disable,
 	.atomic_update	= sun4i_backend_layer_atomic_update,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] drm/sun4i : constify drm_plane_helper_funcs
  2017-07-03 16:05 [PATCH] drm/sun4i : constify drm_plane_helper_funcs Arvind Yadav
@ 2017-07-03 21:29 ` Maxime Ripard
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2017-07-03 21:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 03, 2017 at 09:35:20PM +0530, Arvind Yadav wrote:
> drm_plane_helper_funcs are not supposed to change at runtime.
> All functions working with drm_plane_helper_funcs provided by
> <drm/drm_plane_helper.h> work with const drm_plane_helper_funcs.
> So mark the non-const structs as const.
> 
> File size before:
>    text	   data	    bss	    dec	    hex	filename
>     981	     40	      0	   1021	    3fd drivers/gpu/drm/sun4i/sun4i_layer.o
> 
> File size After adding 'const':
>    text	   data	    bss	    dec	    hex	filename
>    1021	      0	      0	   1021	    3fd drivers/gpu/drm/sun4i/sun4i_layer.o
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Queued for 4.14, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170703/0d3cc400/attachment.sig>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-03 21:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-03 16:05 [PATCH] drm/sun4i : constify drm_plane_helper_funcs Arvind Yadav
2017-07-03 21:29 ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox