linux_dsm_epyc7002/drivers/gpu/drm/sun4i
Julia Lawall dfeb693d5a drm/sun4i: constify component_ops structures
These component_ops structures are only used as the second argument to
component_add and component_del, which are declared as const, so the
structures can be declared as const as well.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@

static struct component_ops i@p = { ... };

@ok1@
identifier r.i;
expression e1;
position p;
@@

component_add(e1,&i@p)

@ok2@
identifier r.i;
expression e1;
position p;
@@

component_del(e1, &i@p)

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
struct component_ops e;
@@

e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@

static
+const
 struct component_ops i = { ... };
// </smpl>

The result of the size command before the change is (arm):

   text       data         bss     dec      hex filename
   5266        236           8    5510     1586 sun4i_backend.o
   6393        236           8    6637     19ed sun4i_tcon.o
   3700        368           8    4076      fec sun4i_tv.o
   1668        108           0    1776      6f0 sun6i_drc.o

and after the change:

   text       data         bss     dec     hex filename
   5274        228           8    5510    1586 sun4i_backend.o
   6401        228           8    6637    19ed sun4i_tcon.o
   3708        360           8    4076     fec sun4i_tv.o
   1676        100           0    1776     6f0 sun6i_drc.o

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1478971198-3659-1-git-send-email-Julia.Lawall@lip6.fr
2016-11-13 11:42:48 +01:00
..
Kconfig drm/sun4i: add COMMON_CLK dependency 2016-05-30 08:28:33 +02:00
Makefile drm/sun4i: Add a DRC driver 2016-09-08 09:31:13 +02:00
sun4i_backend.c drm/sun4i: constify component_ops structures 2016-11-13 11:42:48 +01:00
sun4i_backend.h drm/sun4i: Fix the high buffer address mask 2016-09-22 10:13:22 +03:00
sun4i_crtc.c Linux 4.7 2016-07-26 17:26:29 +10:00
sun4i_crtc.h drm: Add Allwinner A10 Display Engine support 2016-04-28 10:30:05 +02:00
sun4i_dotclock.c drm/sun4i: dotclock: Round to closest clock rate 2016-09-20 09:19:31 +02:00
sun4i_dotclock.h drm: Add Allwinner A10 Display Engine support 2016-04-28 10:30:05 +02:00
sun4i_drv.c drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefs 2016-11-02 11:33:47 -04:00
sun4i_drv.h drm: Add Allwinner A10 Display Engine support 2016-04-28 10:30:05 +02:00
sun4i_framebuffer.c drm/sun4i: add missing header dependencies 2016-09-08 14:55:48 +02:00
sun4i_framebuffer.h drm: Add Allwinner A10 Display Engine support 2016-04-28 10:30:05 +02:00
sun4i_layer.c drm/sun4i: Fix formats usable by the primary plane 2016-09-22 10:10:54 +03:00
sun4i_layer.h drm: Add Allwinner A10 Display Engine support 2016-04-28 10:30:05 +02:00
sun4i_rgb.c drm/sun4i: add missing header dependencies 2016-09-08 14:55:48 +02:00
sun4i_rgb.h drm: sun4i: Add RGB output 2016-04-28 10:30:05 +02:00
sun4i_tcon.c drm/sun4i: constify component_ops structures 2016-11-13 11:42:48 +01:00
sun4i_tcon.h drm/sun4i: support TCONs without channel 1 2016-09-08 08:58:57 +02:00
sun4i_tv.c drm/sun4i: constify component_ops structures 2016-11-13 11:42:48 +01:00
sun6i_drc.c drm/sun4i: constify component_ops structures 2016-11-13 11:42:48 +01:00