drm: Constify drm_encoder_slave_funcs
Subsystems (20)
PATCH 1/20 drm: Constify drm_encoder_slave_funcs
From: Ville Syrjälä <[email protected]>
--- drivers/gpu/drm/drm_encoder_slave.c | 2 +- drivers/gpu/drm/nouveau/nouveau_encoder.h | 2 +- drivers/gpu/drm/rcar-du/rcar_du_hdmicon.c | 6 +++--- drivers/gpu/drm/rcar-du/rcar_du_hdmienc.c | 8 ++++---- include/drm/drm_encoder_slave.h | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-)
drivers/gpu/drm/drm_encoder_slave.c +1 -1
@@ -124,7 +124,7 @@ EXPORT_SYMBOL(drm_i2c_encoder_destroy);* Wrapper fxns which can be plugged in to drm_encoder_helper_funcs: */ -static inline struct drm_encoder_slave_funcs * +static inline const struct drm_encoder_slave_funcs *get_slave_funcs (struct drm_encoder *enc) {return to_encoder_slave (enc)->slave_funcs;
drivers/gpu/drm/nouveau/nouveau_encoder.h +1 -1
@@ -80,7 +80,7 @@ static inline struct drm_encoder *to_drm_encoder(struct nouveau_encoder *enc)return &enc->base.base; } -static inline struct drm_encoder_slave_funcs * +static inline const struct drm_encoder_slave_funcs *get_slave_funcs (struct drm_encoder *enc) {return to_encoder_slave (enc)->slave_funcs;
drivers/gpu/drm/rcar-du/rcar_du_hdmicon.c +3 -3
@@ -28,7 +28,7 @@ static int rcar_du_hdmi_connector_get_modes(struct drm_connector *connector) {struct rcar_du_connector *con =to_rcar_connector (connector);struct drm_encoder *encoder =rcar_encoder_to_drm_encoder (con->encoder); -struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder); +const struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder);if (sfuncs->get_modes ==NULL )return 0 ;
@@ -41,7 +41,7 @@ static int rcar_du_hdmi_connector_mode_valid(struct drm_connector *connector, {struct rcar_du_connector *con =to_rcar_connector (connector);struct drm_encoder *encoder =rcar_encoder_to_drm_encoder (con->encoder); -struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder); +const struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder);if (sfuncs->mode_valid ==NULL )return MODE_OK ;
@@ -66,7 +66,7 @@ rcar_du_hdmi_connector_detect(struct drm_connector *connector, bool force) {struct rcar_du_connector *con =to_rcar_connector (connector);struct drm_encoder *encoder =rcar_encoder_to_drm_encoder (con->encoder); -struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder); +const struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder);if (sfuncs->detect ==NULL )return connector_status_unknown;
drivers/gpu/drm/rcar-du/rcar_du_hdmienc.c +4 -4
@@ -35,7 +35,7 @@ struct rcar_du_hdmienc {static void rcar_du_hdmienc_disable (struct drm_encoder *encoder) {struct rcar_du_hdmienc *hdmienc =to_rcar_hdmienc (encoder); -struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder); +const struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder);if (sfuncs->dpms) sfuncs->dpms (encoder,DRM_MODE_DPMS_OFF );
@@ -50,7 +50,7 @@ static void rcar_du_hdmienc_disable(struct drm_encoder *encoder)static void rcar_du_hdmienc_enable (struct drm_encoder *encoder) {struct rcar_du_hdmienc *hdmienc =to_rcar_hdmienc (encoder); -struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder); +const struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder);if (hdmienc->renc->lvds) rcar_du_lvdsenc_enable(hdmienc->renc->lvds, encoder->crtc,
@@ -67,7 +67,7 @@ static int rcar_du_hdmienc_atomic_check(struct drm_encoder *encoder, struct drm_connector_state *conn_state) {struct rcar_du_hdmienc *hdmienc =to_rcar_hdmienc (encoder); -struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder); +const struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder);struct drm_display_mode *adjusted_mode = &crtc_state->adjusted_mode;const struct drm_display_mode *mode = &crtc_state->mode;
@@ -89,7 +89,7 @@ static void rcar_du_hdmienc_mode_set(struct drm_encoder *encoder, struct drm_display_mode *adjusted_mode) {struct rcar_du_hdmienc *hdmienc =to_rcar_hdmienc (encoder); -struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder); +const struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder);if (sfuncs->mode_set) sfuncs->mode_set (encoder, mode, adjusted_mode);
include/drm/drm_encoder_slave.h +1 -1
@@ -95,7 +95,7 @@ struct drm_encoder_slave_funcs {struct drm_encoder_slave {struct drm_encoder base; -struct drm_encoder_slave_funcs *slave_funcs; +const struct drm_encoder_slave_funcs *slave_funcs;void *slave_priv;void *bus_priv; };
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/20 drm/armada: Constify function pointer structs
From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/armada/armada.ko:
-.rodata 1040 +.rodata 1100 -.data 1156 +.data 1096
--- drivers/gpu/drm/armada/armada_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/armada/armada_crtc.c +1 -1
@@ -1003,7 +1003,7 @@ armada_drm_crtc_set_property(struct drm_crtc *crtc,return 0 ; } -static struct drm_crtc_funcs armada_crtc_funcs = { +static const struct drm_crtc_funcs armada_crtc_funcs = { .cursor_set = armada_drm_crtc_cursor_set, .cursor_move = armada_drm_crtc_cursor_move, .destroy = armada_drm_crtc_destroy,
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/20 drm/atmel-hlcdc: Constify function pointer structs
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/atmel-hlcdc/atmel-hlcdc-dc.ko:
-.text 12488
+.text 12480
-.rodata 1696
+.rodata 1760
-.data 776
+.data 712
--- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c +2 -2
@@ -146,7 +146,7 @@ atmel_hlcdc_rgb_encoder_mode_set(struct drm_encoder *encoder, cfg); } -static struct drm_encoder_helper_funcs atmel_hlcdc_panel_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs atmel_hlcdc_panel_encoder_helper_funcs = { .mode_fixup = atmel_hlcdc_panel_encoder_mode_fixup, .mode_set = atmel_hlcdc_rgb_encoder_mode_set, .disable = atmel_hlcdc_panel_encoder_disable,
@@ -192,7 +192,7 @@ atmel_hlcdc_rgb_best_encoder(struct drm_connector *connector)return &rgb->encoder; } -static struct drm_connector_helper_funcs atmel_hlcdc_panel_connector_helper_funcs = { +static const struct drm_connector_helper_funcs atmel_hlcdc_panel_connector_helper_funcs = { .get_modes = atmel_hlcdc_panel_get_modes, .mode_valid = atmel_hlcdc_rgb_mode_valid, .best_encoder = atmel_hlcdc_rgb_best_encoder,
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 03/20] drm/atmel-hlcdc: Constify function pointer structs
Hi Ville,
Quoted 12 lines · On Wed, 2 Sep 2015 13:44:01 +0300 [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/atmel-hlcdc/atmel-hlcdc-dc.ko:
-.text 12488
+.text 12480
-.rodata 1696
+.rodata 1760
-.data 776
+.data 712
Quoted 2 lines
Signed-off-by Ville Syrjälä <[email protected]>Reviewed-by Alex Deucher <[email protected]>
Again, just for the record since Thierry already have this patch in his DRM trivial tree:
Quoted 26 lines
--- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c +2
-2@@ -146,7 +146,7 @@ atmel_hlcdc_rgb_encoder_mode_set(struct drm_encoder *encoder, cfg); } -static struct drm_encoder_helper_funcs atmel_hlcdc_panel_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs atmel_hlcdc_panel_encoder_helper_funcs = { .mode_fixup = atmel_hlcdc_panel_encoder_mode_fixup, .mode_set = atmel_hlcdc_rgb_encoder_mode_set, .disable = atmel_hlcdc_panel_encoder_disable,@@ -192,7 +192,7 @@ atmel_hlcdc_rgb_best_encoder(struct drm_connector *connector)return &rgb->encoder; } -static struct drm_connector_helper_funcs atmel_hlcdc_panel_connector_helper_funcs = { +static const struct drm_connector_helper_funcs atmel_hlcdc_panel_connector_helper_funcs = { .get_modes = atmel_hlcdc_panel_get_modes, .mode_valid = atmel_hlcdc_rgb_mode_valid, .best_encoder = atmel_hlcdc_rgb_best_encoder,
Signature · 7 lines
Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 4/20 drm/bochs: Constify function pointer structs
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/bochs/bochs-drm.ko:
-.text 7608
+.text 7600
-.rodata 648 +.rodata 716 -.data 612 +.data 544
--- drivers/gpu/drm/bochs/bochs_kms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/bochs/bochs_kms.c +3 -3
@@ -245,13 +245,13 @@ static enum drm_connector_status bochs_connector_detect(struct drm_connectorreturn connector_status_connected; } -struct drm_connector_helper_funcs bochs_connector_connector_helper_funcs = { +static const struct drm_connector_helper_funcs bochs_connector_connector_helper_funcs = { .get_modes = bochs_connector_get_modes, .mode_valid = bochs_connector_mode_valid, .best_encoder = bochs_connector_best_encoder, }; -struct drm_connector_funcs bochs_connector_connector_funcs = { +static const struct drm_connector_funcs bochs_connector_connector_funcs = { .dpms = drm_helper_connector_dpms, .detect = bochs_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,
@@ -283,7 +283,7 @@ int bochs_kms_init(struct bochs_device *bochs) bochs->dev->mode_config.preferred_depth =24 ; bochs->dev->mode_config.prefer_shadow =0 ; - bochs->dev->mode_config.funcs = (void *)&bochs_mode_funcs; + bochs->dev->mode_config.funcs = &bochs_mode_funcs;bochs_crtc_init (bochs->dev);bochs_encoder_init (bochs->dev);
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 5/20 drm/bridge/dw_hdmi: Constify function pointer structs
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/bridge/dw_hdmi.ko:
-.rodata 120
+.rodata 216
-.data 96
+.data 0
--- drivers/gpu/drm/bridge/dw_hdmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/bridge/dw_hdmi.c +3 -3
@@ -1488,20 +1488,20 @@ static void dw_hdmi_connector_destroy(struct drm_connector *connector)drm_connector_cleanup (connector); } -static struct drm_connector_funcs dw_hdmi_connector_funcs = { +static const struct drm_connector_funcs dw_hdmi_connector_funcs = { .dpms = drm_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = dw_hdmi_connector_detect, .destroy = dw_hdmi_connector_destroy, }; -static struct drm_connector_helper_funcs dw_hdmi_connector_helper_funcs = { +static const struct drm_connector_helper_funcs dw_hdmi_connector_helper_funcs = { .get_modes = dw_hdmi_connector_get_modes, .mode_valid = dw_hdmi_connector_mode_valid, .best_encoder = dw_hdmi_connector_best_encoder, }; -static struct drm_bridge_funcs dw_hdmi_bridge_funcs = { +static const struct drm_bridge_funcs dw_hdmi_bridge_funcs = { .enable = dw_hdmi_bridge_enable, .disable = dw_hdmi_bridge_disable, .pre_enable = dw_hdmi_bridge_nop,
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 6/20 drm/bridge/nxp-ptn3460: Constify function pointer structs
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/bridge/nxp-ptn3460.ko:
-.rodata 440 +.rodata 536 -.data 208 +.data 112
--- drivers/gpu/drm/bridge/nxp-ptn3460.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/bridge/nxp-ptn3460.c +3 -3
@@ -242,7 +242,7 @@ static struct drm_encoder *ptn3460_best_encoder(struct drm_connector *connector)return ptn_bridge->bridge.encoder; } -static struct drm_connector_helper_funcs ptn3460_connector_helper_funcs = { +static const struct drm_connector_helper_funcs ptn3460_connector_helper_funcs = { .get_modes = ptn3460_get_modes, .best_encoder = ptn3460_best_encoder, };
@@ -258,7 +258,7 @@ static void ptn3460_connector_destroy(struct drm_connector *connector)drm_connector_cleanup (connector); } -static struct drm_connector_funcs ptn3460_connector_funcs = { +static const struct drm_connector_funcs ptn3460_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = ptn3460_detect,
@@ -299,7 +299,7 @@ static int ptn3460_bridge_attach(struct drm_bridge *bridge)return ret; } -static struct drm_bridge_funcs ptn3460_bridge_funcs = { +static const struct drm_bridge_funcs ptn3460_bridge_funcs = { .pre_enable = ptn3460_pre_enable, .enable = ptn3460_enable, .disable = ptn3460_disable,
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 7/20 drm/i2c/ch7006: Constify function pointer structs
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/i2c/ch7006.ko:
-.text 5752 +.text 5760 -.rodata 6608 +.rodata 6656
-.data 216
+.data 168
--- drivers/gpu/drm/i2c/ch7006_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i2c/ch7006_drv.c +1 -1
@@ -371,7 +371,7 @@ static int ch7006_encoder_set_property(struct drm_encoder *encoder,return 0 ; } -static struct drm_encoder_slave_funcs ch7006_encoder_funcs = { +static const struct drm_encoder_slave_funcs ch7006_encoder_funcs = { .set_config = ch7006_encoder_set_config, .destroy = ch7006_encoder_destroy, .dpms = ch7006_encoder_dpms,
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 8/20 drm/cirrus: Constify function pointer structs
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/cirrus/cirrus.ko:
-.text 10104
+.text 10092
-.rodata 528 +.rodata 596 -.data 608 +.data 540
--- drivers/gpu/drm/cirrus/cirrus_mode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/cirrus/cirrus_mode.c +2 -2
@@ -533,12 +533,12 @@ static void cirrus_connector_destroy(struct drm_connector *connector)kfree (connector); } -struct drm_connector_helper_funcs cirrus_vga_connector_helper_funcs = { +static const struct drm_connector_helper_funcs cirrus_vga_connector_helper_funcs = { .get_modes = cirrus_vga_get_modes, .best_encoder = cirrus_connector_best_encoder, }; -struct drm_connector_funcs cirrus_vga_connector_funcs = { +static const struct drm_connector_funcs cirrus_vga_connector_funcs = { .dpms = drm_helper_connector_dpms, .detect = cirrus_vga_detect, .fill_modes = drm_helper_probe_single_connector_modes,
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 9/20 drm/exynos: Constify function pointer structs
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/exynos/exynosdrm.ko:
-.text 125792
+.text 125788
-.rodata 10972
+.rodata 11748
-.data 6720
+.data 5944
--- drivers/gpu/drm/exynos/exynos_dp_core.c | 8 ++++---- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 4 ++-- drivers/gpu/drm/exynos/exynos_drm_dpi.c | 8 ++++---- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 ++++---- drivers/gpu/drm/exynos/exynos_drm_fb.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_mic.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 8 ++++---- drivers/gpu/drm/exynos/exynos_hdmi.c | 8 ++++---- 8 files changed, 24 insertions(+), 24 deletions(-)
drivers/gpu/drm/exynos/exynos_dp_core.c +4 -4
@@ -953,7 +953,7 @@ static void exynos_dp_connector_destroy(struct drm_connector *connector)drm_connector_cleanup (connector); } -static struct drm_connector_funcs exynos_dp_connector_funcs = { +static const struct drm_connector_funcs exynos_dp_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = exynos_dp_detect,
@@ -998,7 +998,7 @@ static struct drm_encoder *exynos_dp_best_encoder(return &dp->encoder; } -static struct drm_connector_helper_funcs exynos_dp_connector_helper_funcs = { +static const struct drm_connector_helper_funcs exynos_dp_connector_helper_funcs = { .get_modes = exynos_dp_get_modes, .best_encoder = exynos_dp_best_encoder, };
@@ -1123,14 +1123,14 @@ static void exynos_dp_disable(struct drm_encoder *encoder) dp->dpms_mode =DRM_MODE_DPMS_OFF ; } -static struct drm_encoder_helper_funcs exynos_dp_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs exynos_dp_encoder_helper_funcs = { .mode_fixup = exynos_dp_mode_fixup, .mode_set = exynos_dp_mode_set, .enable = exynos_dp_enable, .disable = exynos_dp_disable, }; -static struct drm_encoder_funcs exynos_dp_encoder_funcs = { +static const struct drm_encoder_funcs exynos_dp_encoder_funcs = { .destroy = drm_encoder_cleanup, };
drivers/gpu/drm/exynos/exynos_drm_crtc.c +2 -2
@@ -96,7 +96,7 @@ static void exynos_crtc_atomic_flush(struct drm_crtc *crtc, } } -static struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = { +static const struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = { .enable = exynos_drm_crtc_enable, .disable = exynos_drm_crtc_disable, .mode_fixup = exynos_drm_crtc_mode_fixup,
@@ -116,7 +116,7 @@ static void exynos_drm_crtc_destroy(struct drm_crtc *crtc)kfree (exynos_crtc); } -static struct drm_crtc_funcs exynos_crtc_funcs = { +static const struct drm_crtc_funcs exynos_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .page_flip = drm_atomic_helper_page_flip, .destroy = exynos_drm_crtc_destroy,
drivers/gpu/drm/exynos/exynos_drm_dpi.c +4 -4
@@ -57,7 +57,7 @@ static void exynos_dpi_connector_destroy(struct drm_connector *connector)drm_connector_cleanup (connector); } -static struct drm_connector_funcs exynos_dpi_connector_funcs = { +static const struct drm_connector_funcs exynos_dpi_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .detect = exynos_dpi_detect, .fill_modes = drm_helper_probe_single_connector_modes,
@@ -100,7 +100,7 @@ exynos_dpi_best_encoder(struct drm_connector *connector)return &ctx->encoder; } -static struct drm_connector_helper_funcs exynos_dpi_connector_helper_funcs = { +static const struct drm_connector_helper_funcs exynos_dpi_connector_helper_funcs = { .get_modes = exynos_dpi_get_modes, .best_encoder = exynos_dpi_best_encoder, };
@@ -161,14 +161,14 @@ static void exynos_dpi_disable(struct drm_encoder *encoder) } } -static struct drm_encoder_helper_funcs exynos_dpi_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs exynos_dpi_encoder_helper_funcs = { .mode_fixup = exynos_dpi_mode_fixup, .mode_set = exynos_dpi_mode_set, .enable = exynos_dpi_enable, .disable = exynos_dpi_disable, }; -static struct drm_encoder_funcs exynos_dpi_encoder_funcs = { +static const struct drm_encoder_funcs exynos_dpi_encoder_funcs = { .destroy = drm_encoder_cleanup, };
drivers/gpu/drm/exynos/exynos_drm_dsi.c +4 -4
@@ -1603,7 +1603,7 @@ static void exynos_dsi_connector_destroy(struct drm_connector *connector) connector->dev =NULL ; } -static struct drm_connector_funcs exynos_dsi_connector_funcs = { +static const struct drm_connector_funcs exynos_dsi_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .detect = exynos_dsi_detect, .fill_modes = drm_helper_probe_single_connector_modes,
@@ -1631,7 +1631,7 @@ exynos_dsi_best_encoder(struct drm_connector *connector)return &dsi->encoder; } -static struct drm_connector_helper_funcs exynos_dsi_connector_helper_funcs = { +static const struct drm_connector_helper_funcs exynos_dsi_connector_helper_funcs = { .get_modes = exynos_dsi_get_modes, .best_encoder = exynos_dsi_best_encoder, };
@@ -1684,14 +1684,14 @@ static void exynos_dsi_mode_set(struct drm_encoder *encoder, vm->hsync_len = m->hsync_end - m->hsync_start; } -static struct drm_encoder_helper_funcs exynos_dsi_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs exynos_dsi_encoder_helper_funcs = { .mode_fixup = exynos_dsi_mode_fixup, .mode_set = exynos_dsi_mode_set, .enable = exynos_dsi_enable, .disable = exynos_dsi_disable, }; -static struct drm_encoder_funcs exynos_dsi_encoder_funcs = { +static const struct drm_encoder_funcs exynos_dsi_encoder_funcs = { .destroy = drm_encoder_cleanup, };
drivers/gpu/drm/exynos/exynos_drm_fb.c +1 -1
@@ -116,7 +116,7 @@ static int exynos_drm_fb_dirty(struct drm_framebuffer *fb,return 0 ; } -static struct drm_framebuffer_funcs exynos_drm_fb_funcs = { +static const struct drm_framebuffer_funcs exynos_drm_fb_funcs = { .destroy = exynos_drm_fb_destroy, .create_handle = exynos_drm_fb_create_handle, .dirty = exynos_drm_fb_dirty,
drivers/gpu/drm/exynos/exynos_drm_mic.c +1 -1
@@ -389,7 +389,7 @@ already_disabled:mutex_unlock (&mic_mutex); } -struct drm_bridge_funcs mic_bridge_funcs = { +static const struct drm_bridge_funcs mic_bridge_funcs = { .disable = mic_disable, .post_disable = mic_post_disable, .pre_enable = mic_pre_enable,
drivers/gpu/drm/exynos/exynos_drm_vidi.c +4 -4
@@ -330,7 +330,7 @@ static void vidi_connector_destroy(struct drm_connector *connector) { } -static struct drm_connector_funcs vidi_connector_funcs = { +static const struct drm_connector_funcs vidi_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = vidi_detect,
@@ -374,7 +374,7 @@ static struct drm_encoder *vidi_best_encoder(struct drm_connector *connector)return &ctx->encoder; } -static struct drm_connector_helper_funcs vidi_connector_helper_funcs = { +static const struct drm_connector_helper_funcs vidi_connector_helper_funcs = { .get_modes = vidi_get_modes, .best_encoder = vidi_best_encoder, };
@@ -422,14 +422,14 @@ static void exynos_vidi_disable(struct drm_encoder *encoder) { } -static struct drm_encoder_helper_funcs exynos_vidi_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs exynos_vidi_encoder_helper_funcs = { .mode_fixup = exynos_vidi_mode_fixup, .mode_set = exynos_vidi_mode_set, .enable = exynos_vidi_enable, .disable = exynos_vidi_disable, }; -static struct drm_encoder_funcs exynos_vidi_encoder_funcs = { +static const struct drm_encoder_funcs exynos_vidi_encoder_funcs = { .destroy = drm_encoder_cleanup, };
drivers/gpu/drm/exynos/exynos_hdmi.c +4 -4
@@ -956,7 +956,7 @@ static void hdmi_connector_destroy(struct drm_connector *connector)drm_connector_cleanup (connector); } -static struct drm_connector_funcs hdmi_connector_funcs = { +static const struct drm_connector_funcs hdmi_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = hdmi_detect,
@@ -1034,7 +1034,7 @@ static struct drm_encoder *hdmi_best_encoder(struct drm_connector *connector)return &hdata->encoder; } -static struct drm_connector_helper_funcs hdmi_connector_helper_funcs = { +static const struct drm_connector_helper_funcs hdmi_connector_helper_funcs = { .get_modes = hdmi_get_modes, .mode_valid = hdmi_mode_valid, .best_encoder = hdmi_best_encoder,
@@ -1792,14 +1792,14 @@ static void hdmi_disable(struct drm_encoder *encoder) hdata->powered = false; } -static struct drm_encoder_helper_funcs exynos_hdmi_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs exynos_hdmi_encoder_helper_funcs = { .mode_fixup = hdmi_mode_fixup, .mode_set = hdmi_mode_set, .enable = hdmi_enable, .disable = hdmi_disable, }; -static struct drm_encoder_funcs exynos_hdmi_encoder_funcs = { +static const struct drm_encoder_funcs exynos_hdmi_encoder_funcs = { .destroy = drm_encoder_cleanup, };
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 09/20] drm/exynos: Constify function pointer structs
Hi Ville,
2015-09-02 [email protected] <[email protected]>:
Quoted 14 lines
From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/exynos/exynosdrm.ko:
-.text 125792
+.text 125788
-.rodata 10972
+.rodata 11748
-.data 6720
+.data 5944Signed-off-by Ville Syrjälä <[email protected]>Reviewed-by Alex Deucher <[email protected]>
Quoted 10 lines
--- drivers/gpu/drm/exynos/exynos_dp_core.c | 8 ++++---- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 4 ++-- drivers/gpu/drm/exynos/exynos_drm_dpi.c | 8 ++++---- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 ++++---- drivers/gpu/drm/exynos/exynos_drm_fb.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_mic.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 8 ++++---- drivers/gpu/drm/exynos/exynos_hdmi.c | 8 ++++---- 8 files changed, 24 insertions(+), 24 deletions(-)
Gustavo
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 10/20 drm/i2c/adv7511: Constify function pointer structs
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/i2c/adv7511.ko:
-.rodata 1368
+.rodata 1416
-.data 164
+.data 116
--- drivers/gpu/drm/i2c/adv7511.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i2c/adv7511.c +1 -1
@@ -752,7 +752,7 @@ static void adv7511_encoder_mode_set(struct drm_encoder *encoder, adv7511->f_tmds = mode->clock; } -static struct drm_encoder_slave_funcs adv7511_encoder_funcs = { +static const struct drm_encoder_slave_funcs adv7511_encoder_funcs = { .dpms = adv7511_encoder_dpms, .mode_valid = adv7511_encoder_mode_valid, .mode_set = adv7511_encoder_mode_set,
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 11/20 drm/i2c/sil164: Constify function pointer structs
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/i2c/sil164.ko:
-.text 1660
+.text 1656
-.rodata 56
+.rodata 104 -.data 212 +.data 164
--- drivers/gpu/drm/i2c/sil164_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i2c/sil164_drv.c +1 -1
@@ -341,7 +341,7 @@ sil164_encoder_destroy(struct drm_encoder *encoder)drm_i2c_encoder_destroy (encoder); } -static struct drm_encoder_slave_funcs sil164_encoder_funcs = { +static const struct drm_encoder_slave_funcs sil164_encoder_funcs = { .set_config = sil164_encoder_set_config, .destroy = sil164_encoder_destroy, .dpms = sil164_encoder_dpms,
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 12/20 drm/i2c/tda998x: Constify function pointer structs
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/i2c/tda998x.ko:
-.rodata 668 +.rodata 716 -.data 212 +.data 164
--- drivers/gpu/drm/i2c/tda998x_drv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/i2c/tda998x_drv.c +2 -3
@@ -1213,7 +1213,7 @@ tda998x_encoder_slave_create_resources(struct drm_encoder *encoder,return 0 ; } -static struct drm_encoder_slave_funcs tda998x_encoder_slave_funcs = { +static const struct drm_encoder_slave_funcs tda998x_encoder_slave_funcs = { .set_config = tda998x_encoder_slave_set_config, .destroy = tda998x_encoder_slave_destroy, .dpms = tda998x_encoder_slave_dpms,
@@ -1467,8 +1467,7 @@ tda998x_connector_best_encoder(struct drm_connector *connector)return &priv->encoder; } -static -const struct drm_connector_helper_funcs tda998x_connector_helper_funcs = { +static const struct drm_connector_helper_funcs tda998x_connector_helper_funcs = { .get_modes = tda998x_connector_get_modes, .mode_valid = tda998x_connector_mode_valid, .best_encoder = tda998x_connector_best_encoder,
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 13/20 drm/imx: Constify function pointer structs
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/imx/imxdrm.ko:
-.rodata 624 +.rodata 652 -.data 372 +.data 344
drivers/gpu/drm/imx/imx-ipuv3-crtc.ko:
-.rodata 224 +.rodata 280 -.data 184 +.data 128
drivers/gpu/drm/imx/imx-ldb.ko:
-.rodata 660 +.rodata 784 -.data 240 +.data 116
drivers/gpu/drm/imx/imx-tve.ko:
-.rodata 400 +.rodata 524 -.data 416 +.data 292
drivers/gpu/drm/imx/parallel-display.ko:
-.rodata 400 +.rodata 524 -.data 216
+.data 92
--- drivers/gpu/drm/imx/dw_hdmi-imx.c | 4 ++-- drivers/gpu/drm/imx/imx-drm-core.c | 2 +- drivers/gpu/drm/imx/imx-ldb.c | 8 ++++---- drivers/gpu/drm/imx/imx-tve.c | 8 ++++---- drivers/gpu/drm/imx/ipuv3-crtc.c | 2 +- drivers/gpu/drm/imx/parallel-display.c | 8 ++++---- 6 files changed, 16 insertions(+), 16 deletions(-)
drivers/gpu/drm/imx/dw_hdmi-imx.c +2 -2
@@ -131,7 +131,7 @@ static void dw_hdmi_imx_encoder_prepare(struct drm_encoder *encoder)imx_drm_set_bus_format (encoder,MEDIA_BUS_FMT_RGB888_1X24 ); } -static struct drm_encoder_helper_funcs dw_hdmi_imx_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs dw_hdmi_imx_encoder_helper_funcs = { .mode_fixup = dw_hdmi_imx_encoder_mode_fixup, .mode_set = dw_hdmi_imx_encoder_mode_set, .prepare = dw_hdmi_imx_encoder_prepare,
@@ -139,7 +139,7 @@ static struct drm_encoder_helper_funcs dw_hdmi_imx_encoder_helper_funcs = { .disable = dw_hdmi_imx_encoder_disable, }; -static struct drm_encoder_funcs dw_hdmi_imx_encoder_funcs = { +static const struct drm_encoder_funcs dw_hdmi_imx_encoder_funcs = { .destroy = drm_encoder_cleanup, };
drivers/gpu/drm/imx/imx-drm-core.c +1 -1
@@ -222,7 +222,7 @@ static void imx_drm_output_poll_changed(struct drm_device *drm)#endif } -static struct drm_mode_config_funcs imx_drm_mode_config_funcs = { +static const struct drm_mode_config_funcs imx_drm_mode_config_funcs = { .fb_create = drm_fb_cma_create, .output_poll_changed = imx_drm_output_poll_changed, };
drivers/gpu/drm/imx/imx-ldb.c +4 -4
@@ -358,23 +358,23 @@ static void imx_ldb_encoder_disable(struct drm_encoder *encoder)drm_panel_unprepare (imx_ldb_ch->panel); } -static struct drm_connector_funcs imx_ldb_connector_funcs = { +static const struct drm_connector_funcs imx_ldb_connector_funcs = { .dpms = drm_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = imx_ldb_connector_detect, .destroy = imx_drm_connector_destroy, }; -static struct drm_connector_helper_funcs imx_ldb_connector_helper_funcs = { +static const struct drm_connector_helper_funcs imx_ldb_connector_helper_funcs = { .get_modes = imx_ldb_connector_get_modes, .best_encoder = imx_ldb_connector_best_encoder, }; -static struct drm_encoder_funcs imx_ldb_encoder_funcs = { +static const struct drm_encoder_funcs imx_ldb_encoder_funcs = { .destroy = imx_drm_encoder_destroy, }; -static struct drm_encoder_helper_funcs imx_ldb_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs imx_ldb_encoder_helper_funcs = { .dpms = imx_ldb_encoder_dpms, .mode_fixup = imx_ldb_encoder_mode_fixup, .prepare = imx_ldb_encoder_prepare,
drivers/gpu/drm/imx/imx-tve.c +4 -4
@@ -360,24 +360,24 @@ static void imx_tve_encoder_disable(struct drm_encoder *encoder)tve_disable (tve); } -static struct drm_connector_funcs imx_tve_connector_funcs = { +static const struct drm_connector_funcs imx_tve_connector_funcs = { .dpms = drm_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = imx_tve_connector_detect, .destroy = imx_drm_connector_destroy, }; -static struct drm_connector_helper_funcs imx_tve_connector_helper_funcs = { +static const struct drm_connector_helper_funcs imx_tve_connector_helper_funcs = { .get_modes = imx_tve_connector_get_modes, .best_encoder = imx_tve_connector_best_encoder, .mode_valid = imx_tve_connector_mode_valid, }; -static struct drm_encoder_funcs imx_tve_encoder_funcs = { +static const struct drm_encoder_funcs imx_tve_encoder_funcs = { .destroy = imx_drm_encoder_destroy, }; -static struct drm_encoder_helper_funcs imx_tve_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs imx_tve_encoder_helper_funcs = { .dpms = imx_tve_encoder_dpms, .mode_fixup = imx_tve_encoder_mode_fixup, .prepare = imx_tve_encoder_prepare,
drivers/gpu/drm/imx/ipuv3-crtc.c +1 -1
@@ -269,7 +269,7 @@ static void ipu_crtc_commit(struct drm_crtc *crtc)ipu_fb_enable (ipu_crtc); } -static struct drm_crtc_helper_funcs ipu_helper_funcs = { +static const struct drm_crtc_helper_funcs ipu_helper_funcs = { .dpms = ipu_crtc_dpms, .mode_fixup = ipu_crtc_mode_fixup, .mode_set = ipu_crtc_mode_set,
drivers/gpu/drm/imx/parallel-display.c +4 -4
@@ -144,23 +144,23 @@ static void imx_pd_encoder_disable(struct drm_encoder *encoder)drm_panel_unprepare (imxpd->panel); } -static struct drm_connector_funcs imx_pd_connector_funcs = { +static const struct drm_connector_funcs imx_pd_connector_funcs = { .dpms = drm_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = imx_pd_connector_detect, .destroy = imx_drm_connector_destroy, }; -static struct drm_connector_helper_funcs imx_pd_connector_helper_funcs = { +static const struct drm_connector_helper_funcs imx_pd_connector_helper_funcs = { .get_modes = imx_pd_connector_get_modes, .best_encoder = imx_pd_connector_best_encoder, }; -static struct drm_encoder_funcs imx_pd_encoder_funcs = { +static const struct drm_encoder_funcs imx_pd_encoder_funcs = { .destroy = imx_drm_encoder_destroy, }; -static struct drm_encoder_helper_funcs imx_pd_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs imx_pd_encoder_helper_funcs = { .dpms = imx_pd_encoder_dpms, .mode_fixup = imx_pd_encoder_mode_fixup, .prepare = imx_pd_encoder_prepare,
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 14/20 drm/mgag200: Constify function pointer structs
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/mgag200/mgag200.ko:
-.text 29244
+.text 29232
-.rodata 600 +.rodata 668 -.data 688 +.data 620
--- drivers/gpu/drm/mgag200/mgag200_mode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/mgag200/mgag200_mode.c +2 -2
@@ -1684,13 +1684,13 @@ static void mga_connector_destroy(struct drm_connector *connector)kfree (connector); } -struct drm_connector_helper_funcs mga_vga_connector_helper_funcs = { +static const struct drm_connector_helper_funcs mga_vga_connector_helper_funcs = { .get_modes = mga_vga_get_modes, .mode_valid = mga_vga_mode_valid, .best_encoder = mga_connector_best_encoder, }; -struct drm_connector_funcs mga_vga_connector_funcs = { +static const struct drm_connector_funcs mga_vga_connector_funcs = { .dpms = drm_helper_connector_dpms, .detect = mga_vga_detect, .fill_modes = drm_helper_probe_single_connector_modes,
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 15/20 drm/nouveau: Constify function pointer structs
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/nouveau/nouveau.ko:
-.rodata 105688 +.rodata 105792 -.data 125724 +.data 125620
--- drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/nouveau/dispnv04/tvnv17.c +3 -3
@@ -769,7 +769,7 @@ static void nv17_tv_destroy(struct drm_encoder *encoder)kfree (tv_enc); } -static struct drm_encoder_helper_funcs nv17_tv_helper_funcs = { +static const struct drm_encoder_helper_funcs nv17_tv_helper_funcs = { .dpms = nv17_tv_dpms, .save = nv17_tv_save, .restore = nv17_tv_restore,
@@ -780,14 +780,14 @@ static struct drm_encoder_helper_funcs nv17_tv_helper_funcs = { .detect = nv17_tv_detect, }; -static struct drm_encoder_slave_funcs nv17_tv_slave_funcs = { +static const struct drm_encoder_slave_funcs nv17_tv_slave_funcs = { .get_modes = nv17_tv_get_modes, .mode_valid = nv17_tv_mode_valid, .create_resources = nv17_tv_create_resources, .set_property = nv17_tv_set_property, }; -static struct drm_encoder_funcs nv17_tv_funcs = { +static const struct drm_encoder_funcs nv17_tv_funcs = { .destroy = nv17_tv_destroy, };
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 16/20 drm/rockchip: Constify function pointer structs
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.ko:
-.rodata 772 +.rodata 828 -.data 148
+.data 92
drivers/gpu/drm/rockchip/rockchipdrm.ko:
-.rodata 748 +.rodata 760 -.data 448 +.data 436
--- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 4 ++-- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +2 -2
@@ -173,7 +173,7 @@ dw_hdmi_rockchip_mode_valid(struct drm_connector *connector,return (valid) ?MODE_OK :MODE_BAD ; } -static struct drm_encoder_funcs dw_hdmi_rockchip_encoder_funcs = { +static const struct drm_encoder_funcs dw_hdmi_rockchip_encoder_funcs = { .destroy = drm_encoder_cleanup, };
@@ -218,7 +218,7 @@ static void dw_hdmi_rockchip_encoder_prepare(struct drm_encoder *encoder) ROCKCHIP_OUT_MODE_AAAA); } -static struct drm_encoder_helper_funcs dw_hdmi_rockchip_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs dw_hdmi_rockchip_encoder_helper_funcs = { .mode_fixup = dw_hdmi_rockchip_encoder_mode_fixup, .mode_set = dw_hdmi_rockchip_encoder_mode_set, .prepare = dw_hdmi_rockchip_encoder_prepare,
drivers/gpu/drm/rockchip/rockchip_drm_fb.c +1 -1
@@ -66,7 +66,7 @@ static int rockchip_drm_fb_create_handle(struct drm_framebuffer *fb, rockchip_fb->obj[0], handle); } -static struct drm_framebuffer_funcs rockchip_drm_fb_funcs = { +static const struct drm_framebuffer_funcs rockchip_drm_fb_funcs = { .destroy = rockchip_drm_fb_destroy, .create_handle = rockchip_drm_fb_create_handle, };
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 17/20 drm/sti: Constify function pointer structs
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/sti/sticompositor.ko:
-.text 12216
+.text 12212
-.rodata 1284
+.rodata 1400
-.data 488
+.data 372
drivers/gpu/drm/sti/sti_drv.ko:
-.rodata 516 +.rodata 544 -.data 368 +.data 340
drivers/gpu/drm/sti/stidvo.ko:
-.text 3356
+.text 3348
-.rodata 188 +.rodata 256 -.data 572 +.data 504
drivers/gpu/drm/sti/sti_hda.ko:
-.text 3008 +.text 3004 -.rodata 2820 +.rodata 2888
-.data 684
+.data 616
drivers/gpu/drm/sti/stihdmi.ko:
-.text 6988 +.text 6980 -.rodata 1340 +.rodata 1408
-.data 176
+.data 108
--- drivers/gpu/drm/sti/sti_crtc.c | 4 ++-- drivers/gpu/drm/sti/sti_drv.c | 2 +- drivers/gpu/drm/sti/sti_dvo.c | 4 ++-- drivers/gpu/drm/sti/sti_hda.c | 4 ++-- drivers/gpu/drm/sti/sti_hdmi.c | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-)
drivers/gpu/drm/sti/sti_crtc.c +2 -2
@@ -226,7 +226,7 @@ static void sti_crtc_atomic_flush(struct drm_crtc *crtc, } } -static struct drm_crtc_helper_funcs sti_crtc_helper_funcs = { +static const struct drm_crtc_helper_funcs sti_crtc_helper_funcs = { .enable = sti_crtc_enable, .disable = sti_crtc_disabling, .mode_fixup = sti_crtc_mode_fixup,
@@ -338,7 +338,7 @@ void sti_crtc_disable_vblank(struct drm_device *drm_dev, int crtc) }EXPORT_SYMBOL (sti_crtc_disable_vblank); -static struct drm_crtc_funcs sti_crtc_funcs = { +static const struct drm_crtc_funcs sti_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .page_flip = drm_atomic_helper_page_flip, .destroy = sti_crtc_destroy,
drivers/gpu/drm/sti/sti_drv.c +1 -1
@@ -107,7 +107,7 @@ static int sti_atomic_commit(struct drm_device *drm,return 0 ; } -static struct drm_mode_config_funcs sti_mode_config_funcs = { +static const struct drm_mode_config_funcs sti_mode_config_funcs = { .fb_create = drm_fb_cma_create, .atomic_check = drm_atomic_helper_check, .atomic_commit = sti_atomic_commit,
drivers/gpu/drm/sti/sti_dvo.c +2 -2
@@ -329,7 +329,7 @@ struct drm_encoder *sti_dvo_best_encoder(struct drm_connector *connector)return dvo_connector->encoder; } -static struct drm_connector_helper_funcs sti_dvo_connector_helper_funcs = { +static const struct drm_connector_helper_funcs sti_dvo_connector_helper_funcs = { .get_modes = sti_dvo_connector_get_modes, .mode_valid = sti_dvo_connector_mode_valid, .best_encoder = sti_dvo_best_encoder,
@@ -364,7 +364,7 @@ static void sti_dvo_connector_destroy(struct drm_connector *connector)kfree (dvo_connector); } -static struct drm_connector_funcs sti_dvo_connector_funcs = { +static const struct drm_connector_funcs sti_dvo_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = sti_dvo_connector_detect,
drivers/gpu/drm/sti/sti_hda.c +2 -2
@@ -589,7 +589,7 @@ struct drm_encoder *sti_hda_best_encoder(struct drm_connector *connector)return hda_connector->encoder; } -static struct drm_connector_helper_funcs sti_hda_connector_helper_funcs = { +static const struct drm_connector_helper_funcs sti_hda_connector_helper_funcs = { .get_modes = sti_hda_connector_get_modes, .mode_valid = sti_hda_connector_mode_valid, .best_encoder = sti_hda_best_encoder,
@@ -611,7 +611,7 @@ static void sti_hda_connector_destroy(struct drm_connector *connector)kfree (hda_connector); } -static struct drm_connector_funcs sti_hda_connector_funcs = { +static const struct drm_connector_funcs sti_hda_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = sti_hda_connector_detect,
drivers/gpu/drm/sti/sti_hdmi.c +2 -2
@@ -628,7 +628,7 @@ struct drm_encoder *sti_hdmi_best_encoder(struct drm_connector *connector)return hdmi_connector->encoder; } -static struct drm_connector_helper_funcs sti_hdmi_connector_helper_funcs = { +static const struct drm_connector_helper_funcs sti_hdmi_connector_helper_funcs = { .get_modes = sti_hdmi_connector_get_modes, .mode_valid = sti_hdmi_connector_mode_valid, .best_encoder = sti_hdmi_best_encoder,
@@ -663,7 +663,7 @@ static void sti_hdmi_connector_destroy(struct drm_connector *connector)kfree (hdmi_connector); } -static struct drm_connector_funcs sti_hdmi_connector_funcs = { +static const struct drm_connector_funcs sti_hdmi_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = sti_hdmi_connector_detect,
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 18/20 drm/tegra: Constify function pointer structs
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/tegra/tegra-drm.ko:
-.rodata 13672
+.rodata 13684
-.data 1108
+.data 1096
--- drivers/gpu/drm/tegra/fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tegra/fb.c +1 -1
@@ -86,7 +86,7 @@ static int tegra_fb_create_handle(struct drm_framebuffer *framebuffer,return drm_gem_handle_create (file, &fb->planes[0 ]->gem, handle); } -static struct drm_framebuffer_funcs tegra_fb_funcs = { +static const struct drm_framebuffer_funcs tegra_fb_funcs = { .destroy = tegra_fb_destroy, .create_handle = tegra_fb_create_handle, };
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 19/20 drm/udl: Constify function pointer structs
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/udl/udl.ko:
-.text 11336
+.text 11332
-.rodata 560 +.rodata 684 -.data 696 +.data 572
--- drivers/gpu/drm/udl/udl_connector.c | 4 ++-- drivers/gpu/drm/udl/udl_modeset.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/udl/udl_connector.c +2 -2
@@ -122,13 +122,13 @@ static void udl_connector_destroy(struct drm_connector *connector)kfree (connector); } -static struct drm_connector_helper_funcs udl_connector_helper_funcs = { +static const struct drm_connector_helper_funcs udl_connector_helper_funcs = { .get_modes = udl_get_modes, .mode_valid = udl_mode_valid, .best_encoder = udl_best_single_encoder, }; -static struct drm_connector_funcs udl_connector_funcs = { +static const struct drm_connector_funcs udl_connector_funcs = { .dpms = drm_helper_connector_dpms, .detect = udl_detect, .fill_modes = drm_helper_probe_single_connector_modes,
drivers/gpu/drm/udl/udl_modeset.c +1 -1
@@ -400,7 +400,7 @@ static void udl_crtc_commit(struct drm_crtc *crtc)udl_crtc_dpms (crtc,DRM_MODE_DPMS_ON ); } -static struct drm_crtc_helper_funcs udl_helper_funcs = { +static const struct drm_crtc_helper_funcs udl_helper_funcs = { .dpms = udl_crtc_dpms, .mode_fixup = udl_crtc_mode_fixup, .mode_set = udl_crtc_mode_set,
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 20/20 drm/vmwgfx: Constify function pointer structs
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/vmwgfx/vmwgfx.ko:
-.text 132244
+.text 132240
-.rodata 18296
+.rodata 18680
-.data 5096
+.data 4712
--- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 6 +++--- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 6 +++--- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +2 -2
@@ -470,7 +470,7 @@ int vmw_kms_readback(struct vmw_private *dev_priv, } -static struct drm_framebuffer_funcs vmw_framebuffer_surface_funcs = { +static const struct drm_framebuffer_funcs vmw_framebuffer_surface_funcs = { .destroy = vmw_framebuffer_surface_destroy, .dirty = vmw_framebuffer_surface_dirty, };
@@ -647,7 +647,7 @@ static int vmw_framebuffer_dmabuf_dirty(struct drm_framebuffer *framebuffer,return ret; } -static struct drm_framebuffer_funcs vmw_framebuffer_dmabuf_funcs = { +static const struct drm_framebuffer_funcs vmw_framebuffer_dmabuf_funcs = { .destroy = vmw_framebuffer_dmabuf_destroy, .dirty = vmw_framebuffer_dmabuf_dirty, };
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c +3 -3
@@ -294,7 +294,7 @@ static int vmw_ldu_crtc_set_config(struct drm_mode_set *set)return vmw_ldu_commit_list (dev_priv); } -static struct drm_crtc_funcs vmw_legacy_crtc_funcs = { +static const struct drm_crtc_funcs vmw_legacy_crtc_funcs = { .save = vmw_du_crtc_save, .restore = vmw_du_crtc_restore, .cursor_set = vmw_du_crtc_cursor_set,
@@ -314,7 +314,7 @@ static void vmw_ldu_encoder_destroy(struct drm_encoder *encoder)vmw_ldu_destroy (vmw_encoder_to_ldu (encoder)); } -static struct drm_encoder_funcs vmw_legacy_encoder_funcs = { +static const struct drm_encoder_funcs vmw_legacy_encoder_funcs = { .destroy = vmw_ldu_encoder_destroy, };
@@ -327,7 +327,7 @@ static void vmw_ldu_connector_destroy(struct drm_connector *connector)vmw_ldu_destroy (vmw_connector_to_ldu (connector)); } -static struct drm_connector_funcs vmw_legacy_connector_funcs = { +static const struct drm_connector_funcs vmw_legacy_connector_funcs = { .dpms = vmw_du_connector_dpms, .save = vmw_du_connector_save, .restore = vmw_du_connector_restore,
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +3 -3
@@ -530,7 +530,7 @@ out_no_fence:return ret; } -static struct drm_crtc_funcs vmw_screen_object_crtc_funcs = { +static const struct drm_crtc_funcs vmw_screen_object_crtc_funcs = { .save = vmw_du_crtc_save, .restore = vmw_du_crtc_restore, .cursor_set = vmw_du_crtc_cursor_set,
@@ -550,7 +550,7 @@ static void vmw_sou_encoder_destroy(struct drm_encoder *encoder)vmw_sou_destroy (vmw_encoder_to_sou (encoder)); } -static struct drm_encoder_funcs vmw_screen_object_encoder_funcs = { +static const struct drm_encoder_funcs vmw_screen_object_encoder_funcs = { .destroy = vmw_sou_encoder_destroy, };
@@ -563,7 +563,7 @@ static void vmw_sou_connector_destroy(struct drm_connector *connector)vmw_sou_destroy (vmw_connector_to_sou (connector)); } -static struct drm_connector_funcs vmw_sou_connector_funcs = { +static const struct drm_connector_funcs vmw_sou_connector_funcs = { .dpms = vmw_du_connector_dpms, .save = vmw_du_connector_save, .restore = vmw_du_connector_restore,
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +3 -3
@@ -1038,7 +1038,7 @@ out_finish:/* * Screen Target CRTC dispatch table */ -static struct drm_crtc_funcs vmw_stdu_crtc_funcs = { +static const struct drm_crtc_funcs vmw_stdu_crtc_funcs = { .save = vmw_du_crtc_save, .restore = vmw_du_crtc_restore, .cursor_set = vmw_du_crtc_cursor_set,
@@ -1070,7 +1070,7 @@ static void vmw_stdu_encoder_destroy(struct drm_encoder *encoder)vmw_stdu_destroy (vmw_encoder_to_stdu (encoder)); } -static struct drm_encoder_funcs vmw_stdu_encoder_funcs = { +static const struct drm_encoder_funcs vmw_stdu_encoder_funcs = { .destroy = vmw_stdu_encoder_destroy, };
@@ -1097,7 +1097,7 @@ static void vmw_stdu_connector_destroy(struct drm_connector *connector) -static struct drm_connector_funcs vmw_stdu_connector_funcs = { +static const struct drm_connector_funcs vmw_stdu_connector_funcs = { .dpms = vmw_du_connector_dpms, .save = vmw_du_connector_save, .restore = vmw_du_connector_restore,
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel