kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] drm/amd/display: Fix unused initialization of pointer sink
@ 2021-08-29 16:46 Colin King
  2021-08-30 16:08 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-08-29 16:46 UTC (permalink / raw)
  To: Harry Wentland, Leo Li, Alex Deucher, Christian König,
	Xinhui.Pan, David Airlie, Daniel Vetter, amd-gfx, dri-devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Pointer sink is being inintialized with a value that is never read,
it is later being re-assigned a new value. Remove the redundant
initialization.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index e1e57e7465a7..9331c19fe9cb 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -10917,7 +10917,7 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
 	struct amdgpu_dm_connector *amdgpu_dm_connector =
 			to_amdgpu_dm_connector(connector);
 	struct dm_connector_state *dm_con_state = NULL;
-	struct dc_sink *sink = amdgpu_dm_connector->dc_sink;
+	struct dc_sink *sink;
 
 	struct drm_device *dev = connector->dev;
 	struct amdgpu_device *adev = drm_to_adev(dev);
-- 
2.32.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][next] drm/amd/display: Fix unused initialization of pointer sink
  2021-08-29 16:46 [PATCH][next] drm/amd/display: Fix unused initialization of pointer sink Colin King
@ 2021-08-30 16:08 ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2021-08-30 16:08 UTC (permalink / raw)
  To: Colin King
  Cc: Harry Wentland, Leo Li, Alex Deucher, Christian König,
	xinhui pan, David Airlie, Daniel Vetter, amd-gfx list,
	Maling list - DRI developers, kernel-janitors, LKML

Applied.  Thanks!

Alex

On Sun, Aug 29, 2021 at 12:46 PM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointer sink is being inintialized with a value that is never read,
> it is later being re-assigned a new value. Remove the redundant
> initialization.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index e1e57e7465a7..9331c19fe9cb 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -10917,7 +10917,7 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
>         struct amdgpu_dm_connector *amdgpu_dm_connector =
>                         to_amdgpu_dm_connector(connector);
>         struct dm_connector_state *dm_con_state = NULL;
> -       struct dc_sink *sink = amdgpu_dm_connector->dc_sink;
> +       struct dc_sink *sink;
>
>         struct drm_device *dev = connector->dev;
>         struct amdgpu_device *adev = drm_to_adev(dev);
> --
> 2.32.0
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-30 16:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-29 16:46 [PATCH][next] drm/amd/display: Fix unused initialization of pointer sink Colin King
2021-08-30 16:08 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).