diff mbox series

[06/20] drm/radeon/radeon_connectors: Strip out set but unused variable 'ret'

Message ID 20201109211855.3340030-7-lee.jones@linaro.org
State Accepted
Commit a27d120527a58fa97b046afadc5aa770b8563335
Headers show
Series [01/20] drm/radeon/radeon_ttm: Place declaration of 'rdev' in same clause as its use | expand

Commit Message

Lee Jones Nov. 9, 2020, 9:18 p.m. UTC
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/radeon/radeon_connectors.c: In function ‘radeon_setup_mst_connector’:
 drivers/gpu/drm/radeon/radeon_connectors.c:2574:7: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/radeon_connectors.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Alex Deucher Nov. 10, 2020, 10:08 p.m. UTC | #1
On Mon, Nov 9, 2020 at 4:19 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/radeon_connectors.c: In function ‘radeon_setup_mst_connector’:
>  drivers/gpu/drm/radeon/radeon_connectors.c:2574:7: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/radeon_connectors.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
> index e308344344425..607ad5620bd99 100644
> --- a/drivers/gpu/drm/radeon/radeon_connectors.c
> +++ b/drivers/gpu/drm/radeon/radeon_connectors.c
> @@ -2571,13 +2571,11 @@ void radeon_setup_mst_connector(struct drm_device *dev)
>                 return;
>
>         list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
> -               int ret;
> -
>                 radeon_connector = to_radeon_connector(connector);
>
>                 if (connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort)
>                         continue;
>
> -               ret = radeon_dp_mst_init(radeon_connector);
> +               radeon_dp_mst_init(radeon_connector);
>         }
>  }
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index e308344344425..607ad5620bd99 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -2571,13 +2571,11 @@  void radeon_setup_mst_connector(struct drm_device *dev)
 		return;
 
 	list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
-		int ret;
-
 		radeon_connector = to_radeon_connector(connector);
 
 		if (connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort)
 			continue;
 
-		ret = radeon_dp_mst_init(radeon_connector);
+		radeon_dp_mst_init(radeon_connector);
 	}
 }