[PATCH 12/30] drm/radeon/radeon_dp_mst: Remove unused variable 'ret' from radeon_mst_encoder_dpms()

Alex Deucher alexdeucher at gmail.com
Tue Nov 10 23:39:16 UTC 2020


On Tue, Nov 10, 2020 at 2:31 PM Lee Jones <lee.jones at linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/radeon_dp_mst.c: In function ‘radeon_mst_encoder_dpms’:
>  drivers/gpu/drm/radeon/radeon_dp_mst.c:366:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Cc: "Christian König" <christian.koenig at amd.com>
> Cc: David Airlie <airlied at linux.ie>
> Cc: Daniel Vetter <daniel at ffwll.ch>
> Cc: amd-gfx at lists.freedesktop.org
> Cc: dri-devel at lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones at linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/radeon_dp_mst.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c b/drivers/gpu/drm/radeon/radeon_dp_mst.c
> index 008308780443c..2c32186c4acd9 100644
> --- a/drivers/gpu/drm/radeon/radeon_dp_mst.c
> +++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c
> @@ -363,7 +363,7 @@ radeon_mst_encoder_dpms(struct drm_encoder *encoder, int mode)
>         struct radeon_connector *radeon_connector;
>         struct drm_crtc *crtc;
>         struct radeon_crtc *radeon_crtc;
> -       int ret, slots;
> +       int slots;
>         s64 fixed_pbn, fixed_pbn_per_slot, avg_time_slots_per_mtp;
>         if (!ASIC_IS_DCE5(rdev)) {
>                 DRM_ERROR("got mst dpms on non-DCE5\n");
> @@ -418,10 +418,10 @@ radeon_mst_encoder_dpms(struct drm_encoder *encoder, int mode)
>
>                 slots = drm_dp_find_vcpi_slots(&radeon_connector->mst_port->mst_mgr,
>                                                mst_enc->pbn);
> -               ret = drm_dp_mst_allocate_vcpi(&radeon_connector->mst_port->mst_mgr,
> -                                              radeon_connector->port,
> -                                              mst_enc->pbn, slots);
> -               ret = drm_dp_update_payload_part1(&radeon_connector->mst_port->mst_mgr);
> +               drm_dp_mst_allocate_vcpi(&radeon_connector->mst_port->mst_mgr,
> +                                        radeon_connector->port,
> +                                        mst_enc->pbn, slots);
> +               drm_dp_update_payload_part1(&radeon_connector->mst_port->mst_mgr);
>
>                 radeon_dp_mst_set_be_cntl(primary, mst_enc,
>                                           radeon_connector->mst_port->hpd.hpd, true);
> @@ -436,9 +436,9 @@ radeon_mst_encoder_dpms(struct drm_encoder *encoder, int mode)
>
>                 atombios_dig_encoder_setup2(&primary->base, ATOM_ENCODER_CMD_DP_VIDEO_ON, 0,
>                                             mst_enc->fe);
> -               ret = drm_dp_check_act_status(&radeon_connector->mst_port->mst_mgr);
> +               drm_dp_check_act_status(&radeon_connector->mst_port->mst_mgr);
>
> -               ret = drm_dp_update_payload_part2(&radeon_connector->mst_port->mst_mgr);
> +               drm_dp_update_payload_part2(&radeon_connector->mst_port->mst_mgr);
>
>                 break;
>         case DRM_MODE_DPMS_STANDBY:
> @@ -450,7 +450,7 @@ radeon_mst_encoder_dpms(struct drm_encoder *encoder, int mode)
>                         return;
>
>                 drm_dp_mst_reset_vcpi_slots(&radeon_connector->mst_port->mst_mgr, mst_enc->port);
> -               ret = drm_dp_update_payload_part1(&radeon_connector->mst_port->mst_mgr);
> +               drm_dp_update_payload_part1(&radeon_connector->mst_port->mst_mgr);
>
>                 drm_dp_check_act_status(&radeon_connector->mst_port->mst_mgr);
>                 /* and this can also fail */
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


More information about the dri-devel mailing list