mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 14:44:31 +07:00
drm/komeda: Fix warning -Wunused-but-set-variable
Fixed two -Wunused-but-set-variable warnings: /arm/linux/display/aosp-4.14-drm-next/drivers/gpu/drm/arm/display/komeda/komeda_kms.c: In function ‘komeda_crtc_normalize_zpos’: /arm/linux/display/aosp-4.14-drm-next/drivers/gpu/drm/arm/display/komeda/komeda_kms.c:150:26: warning: variable ‘fb’ set but not used [-Wunused-but-set-variable] struct drm_framebuffer *fb; ^~ /arm/linux/display/aosp-4.14-drm-next/drivers/gpu/drm/arm/display/komeda/komeda_kms.c: In function ‘komeda_kms_check’: /arm/linux/display/aosp-4.14-drm-next/drivers/gpu/drm/arm/display/komeda/komeda_kms.c:209:25: warning: variable ‘old_crtc_st’ set but not used [-Wunused-but-set-variable] struct drm_crtc_state *old_crtc_st, *new_crtc_st; ^~~~~~~~~~~ Signed-off-by: james qian wang (Arm Technology China) <james.qian.wang@arm.com> Reviewed-by: Ayan Kumar Halder <ayan.halder@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190812112322.15990-1-james.qian.wang@arm.com
This commit is contained in:
parent
8f6a79112a
commit
61d05b1849
@ -147,7 +147,6 @@ static int komeda_crtc_normalize_zpos(struct drm_crtc *crtc,
|
|||||||
struct komeda_crtc_state *kcrtc_st = to_kcrtc_st(crtc_st);
|
struct komeda_crtc_state *kcrtc_st = to_kcrtc_st(crtc_st);
|
||||||
struct komeda_plane_state *kplane_st;
|
struct komeda_plane_state *kplane_st;
|
||||||
struct drm_plane_state *plane_st;
|
struct drm_plane_state *plane_st;
|
||||||
struct drm_framebuffer *fb;
|
|
||||||
struct drm_plane *plane;
|
struct drm_plane *plane;
|
||||||
struct list_head zorder_list;
|
struct list_head zorder_list;
|
||||||
int order = 0, err;
|
int order = 0, err;
|
||||||
@ -173,7 +172,6 @@ static int komeda_crtc_normalize_zpos(struct drm_crtc *crtc,
|
|||||||
|
|
||||||
list_for_each_entry(kplane_st, &zorder_list, zlist_node) {
|
list_for_each_entry(kplane_st, &zorder_list, zlist_node) {
|
||||||
plane_st = &kplane_st->base;
|
plane_st = &kplane_st->base;
|
||||||
fb = plane_st->fb;
|
|
||||||
plane = plane_st->plane;
|
plane = plane_st->plane;
|
||||||
|
|
||||||
plane_st->normalized_zpos = order++;
|
plane_st->normalized_zpos = order++;
|
||||||
@ -206,7 +204,7 @@ static int komeda_kms_check(struct drm_device *dev,
|
|||||||
struct drm_atomic_state *state)
|
struct drm_atomic_state *state)
|
||||||
{
|
{
|
||||||
struct drm_crtc *crtc;
|
struct drm_crtc *crtc;
|
||||||
struct drm_crtc_state *old_crtc_st, *new_crtc_st;
|
struct drm_crtc_state *new_crtc_st;
|
||||||
int i, err;
|
int i, err;
|
||||||
|
|
||||||
err = drm_atomic_helper_check_modeset(dev, state);
|
err = drm_atomic_helper_check_modeset(dev, state);
|
||||||
@ -217,7 +215,7 @@ static int komeda_kms_check(struct drm_device *dev,
|
|||||||
* so need to add all affected_planes (even unchanged) to
|
* so need to add all affected_planes (even unchanged) to
|
||||||
* drm_atomic_state.
|
* drm_atomic_state.
|
||||||
*/
|
*/
|
||||||
for_each_oldnew_crtc_in_state(state, crtc, old_crtc_st, new_crtc_st, i) {
|
for_each_new_crtc_in_state(state, crtc, new_crtc_st, i) {
|
||||||
err = drm_atomic_add_affected_planes(state, crtc);
|
err = drm_atomic_add_affected_planes(state, crtc);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
Loading…
Reference in New Issue
Block a user