drm: Silence the compiler for drm_mode_get_hv_timings()
Subsystems (2)
PATCH 1/1 drm: Silence the compiler for drm_mode_get_hv_timings()
Since moving drm_crtc_get_hv_timings() into drm_modes.c, the compiler has been able to get smarter and spots that drm_mode_copy() is trying to preserve garbage from the stack.
--- drivers/gpu/drm/drm_modes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/drm_modes.c +1 -2
@@ -808,9 +808,8 @@ EXPORT_SYMBOL(drm_mode_vrefresh);void drm_mode_get_hv_timing (const struct drm_display_mode *mode,int *hdisplay,int *vdisplay) { -struct drm_display_mode adjusted; +struct drm_display_mode adjusted = *mode; -drm_mode_copy (&adjusted, mode);drm_mode_set_crtcinfo (&adjusted,CRTC_STEREO_DOUBLE_ONLY ); *hdisplay = adjusted.crtc_hdisplay; *vdisplay = adjusted.crtc_vdisplay;
Signature · 6 lines
2.11.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 8 lines · Chris Wilson
Since moving
drm_crtc_get_hv_timings()intodrm_modes.c, the compiler has been able to get smarter and spots thatdrm_mode_copy()is trying to preserve garbage from the stack.Fixes 196cd5d3758c ("drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/")Signed-off-by Chris Wilson <[email protected]>Cc Daniel Vetter <[email protected]>Cc Alex Deucher <[email protected]>
Quoted 26 lines
--- drivers/gpu/drm/drm_modes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/drm_modes.c +1
-2@@ -808,9 +808,8 @@ EXPORT_SYMBOL(drm_mode_vrefresh);void drm_mode_get_hv_timing (const struct drm_display_mode *mode,int *hdisplay,int *vdisplay) { -struct drm_display_mode adjusted; +struct drm_display_mode adjusted = *mode; -drm_mode_copy (&adjusted, mode);drm_mode_set_crtcinfo (&adjusted,CRTC_STEREO_DOUBLE_ONLY ); *hdisplay = adjusted.crtc_hdisplay; *vdisplay = adjusted.crtc_vdisplay;Signature · 6 lines
2.11.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 11 lines · Ville Syrjälä
Quoted 8 lines · Chris Wilson
Since moving
drm_crtc_get_hv_timings()intodrm_modes.c, the compiler has been able to get smarter and spots thatdrm_mode_copy()is trying to preserve garbage from the stack.Fixes 196cd5d3758c ("drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/")Signed-off-by Chris Wilson <[email protected]>Cc Daniel Vetter <[email protected]>Cc Alex Deucher <[email protected]>Reviewed-by Ville Syrjälä <[email protected]>
Could have directly pushed to drm-misc-next ... *hint*
Thanks for patch&review, applied.
-Daniel
Quoted 35 lines
Quoted 27 lines
--- drivers/gpu/drm/drm_modes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/drm_modes.c +1
-2@@ -808,9 +808,8 @@ EXPORT_SYMBOL(drm_mode_vrefresh);void drm_mode_get_hv_timing (const struct drm_display_mode *mode,int *hdisplay,int *vdisplay) { -struct drm_display_mode adjusted; +struct drm_display_mode adjusted = *mode; -drm_mode_copy (&adjusted, mode);drm_mode_set_crtcinfo (&adjusted,CRTC_STEREO_DOUBLE_ONLY ); *hdisplay = adjusted.crtc_hdisplay; *vdisplay = adjusted.crtc_vdisplay;Signature · 6 lines
2.11.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-develSignature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · Daniel Vetter
Quoted 5 lines · Ville Syrjälä
Quoted 4 lines · Chris Wilson
Since moving
drm_crtc_get_hv_timings()intodrm_modes.c, the compiler has been able to get smarter and spots thatdrm_mode_copy()is trying to preserve garbage from the stack.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Fixes 196cd5d3758c ("drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/")Signed-off-by Chris Wilson <[email protected]>Cc Daniel Vetter <[email protected]>Cc Alex Deucher <[email protected]>Reviewed-by Ville Syrjälä <[email protected]>Could have directly pushed to drm-misc-next ... *hint*
That would miss the chance for some good bikeshedding ;)
Quoted 44 lines
Thanks for patch&review, applied.
-DanielQuoted 35 lines
Quoted 27 lines
--- drivers/gpu/drm/drm_modes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/drm_modes.c +1
-2@@ -808,9 +808,8 @@ EXPORT_SYMBOL(drm_mode_vrefresh);void drm_mode_get_hv_timing (const struct drm_display_mode *mode,int *hdisplay,int *vdisplay) { -struct drm_display_mode adjusted; +struct drm_display_mode adjusted = *mode; -drm_mode_copy (&adjusted, mode);drm_mode_set_crtcinfo (&adjusted,CRTC_STEREO_DOUBLE_ONLY ); *hdisplay = adjusted.crtc_hdisplay; *vdisplay = adjusted.crtc_vdisplay;Signature · 6 lines
2.11.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-develSignature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-develSignature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 12 lines
-----Original Message-----
From: Chris Wilson [mailto:[email protected]] On Behalf Of Chris Wilson
Sent: Thursday, January 26, 2017 6:44 AM
To: [email protected]
Cc: Chris Wilson; Daniel Vetter; Deucher, Alexander
Subject: [PATCH] drm: Silence the compiler fordrm_mode_get_hv_timings()Since moving
drm_crtc_get_hv_timings()intodrm_modes.c, the compiler has been able to get smarter and spots thatdrm_mode_copy()is trying to preserve garbage from the stack.
Quoted 5 lines
Fixes 196cd5d3758c ("drm:s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/")
Signed-off-by Chris Wilson <[email protected]>Cc Daniel Vetter <[email protected]>Cc Alex Deucher <[email protected]>
Quoted 20 lines
--- drivers/gpu/drm/drm_modes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/drm_modes.c +1
-3@@ -808,9 +808,8 @@ EXPORT_SYMBOL(drm_mode_vrefresh);void drm_mode_get_hv_timing (const struct drm_display_mode *mode,int *hdisplay,int *vdisplay) { -struct drm_display_mode adjusted; +struct drm_display_mode adjusted = *mode; -drm_mode_copy (&adjusted, mode);drm_mode_set_crtcinfo (&adjusted,CRTC_STEREO_DOUBLE_ONLY ); *hdisplay = adjusted.crtc_hdisplay; *vdisplay = adjusted.crtc_vdisplay; --
Quoted 1 line
2.11.0
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel