diff mbox series

[5/5] drm/amd/display: Remove the unused function copy_stream_update_to_stream()

Message ID 20220913083805.22549-5-jiapeng.chong@linux.alibaba.com (mailing list archive)
State New, archived
Headers show
Series [1/5] drm/amd/display: make enc32_stream_encoder_dvi_set_stream_attribute static | expand

Commit Message

Jiapeng Chong Sept. 13, 2022, 8:38 a.m. UTC
The function copy_stream_update_to_stream() is defined in the notif.c
file, but not called elsewhere, so delete this unused function.

drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:2852:6: warning: no previous prototype for ‘dc_reset_state’.

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2113
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 10 ----------
 1 file changed, 10 deletions(-)

Comments

Alex Deucher Sept. 13, 2022, 1:01 p.m. UTC | #1
Applied the series.  Thanks!

Alex

On Tue, Sep 13, 2022 at 4:39 AM Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> The function copy_stream_update_to_stream() is defined in the notif.c
> file, but not called elsewhere, so delete this unused function.
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:2852:6: warning: no previous prototype for ‘dc_reset_state’.
>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2113
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>  drivers/gpu/drm/amd/display/dc/core/dc.c | 10 ----------
>  1 file changed, 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
> index 9860bf38c547..2ee0b5a2ce62 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
> @@ -2849,16 +2849,6 @@ static void copy_stream_update_to_stream(struct dc *dc,
>         }
>  }
>
> -void dc_reset_state(struct dc *dc, struct dc_state *context)
> -{
> -       dc_resource_state_destruct(context);
> -
> -       /* clear the structure, but don't reset the reference count */
> -       memset(context, 0, offsetof(struct dc_state, refcount));
> -
> -       init_state(dc, context);
> -}
> -
>  static bool update_planes_and_stream_state(struct dc *dc,
>                 struct dc_surface_update *srf_updates, int surface_count,
>                 struct dc_stream_state *stream,
> --
> 2.20.1.7.g153144c
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 9860bf38c547..2ee0b5a2ce62 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -2849,16 +2849,6 @@  static void copy_stream_update_to_stream(struct dc *dc,
 	}
 }
 
-void dc_reset_state(struct dc *dc, struct dc_state *context)
-{
-	dc_resource_state_destruct(context);
-
-	/* clear the structure, but don't reset the reference count */
-	memset(context, 0, offsetof(struct dc_state, refcount));
-
-	init_state(dc, context);
-}
-
 static bool update_planes_and_stream_state(struct dc *dc,
 		struct dc_surface_update *srf_updates, int surface_count,
 		struct dc_stream_state *stream,