linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH next] drm/amd/display: make non-global functions static
@ 2019-12-19 11:55 Chen Zhou
  2019-12-19 14:17 ` Harry Wentland
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Zhou @ 2019-12-19 11:55 UTC (permalink / raw)
  To: harry.wentland, sunpeng.li, alexander.deucher
  Cc: dri-devel, linux-kernel, chenzhou10

Fix sparse warning:

drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:964:5:
	warning: symbol 'shift_border_left_to_dst' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:975:6:
	warning: symbol 'restore_border_left_from_dst' was not declared. Should it be static?

Fixes: 89d07b662f5e (drm/amd/display: fix 270 degree rotation for mixed-SLS mode)
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index 64a0e08f..5843c16 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -961,7 +961,7 @@ static void calculate_inits_and_adj_vp(struct pipe_ctx *pipe_ctx)
  * We also need to make sure pipe_ctx->plane_res.scl_data.h_active uses the
  * original h_border_left value in its calculation.
  */
-int shift_border_left_to_dst(struct pipe_ctx *pipe_ctx)
+static int shift_border_left_to_dst(struct pipe_ctx *pipe_ctx)
 {
 	int store_h_border_left = pipe_ctx->stream->timing.h_border_left;
 
@@ -972,7 +972,7 @@ int shift_border_left_to_dst(struct pipe_ctx *pipe_ctx)
 	return store_h_border_left;
 }
 
-void restore_border_left_from_dst(struct pipe_ctx *pipe_ctx,
+static void restore_border_left_from_dst(struct pipe_ctx *pipe_ctx,
                                   int store_h_border_left)
 {
 	pipe_ctx->stream->dst.x -= store_h_border_left;
-- 
2.7.4


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

* Re: [PATCH next] drm/amd/display: make non-global functions static
  2019-12-19 11:55 [PATCH next] drm/amd/display: make non-global functions static Chen Zhou
@ 2019-12-19 14:17 ` Harry Wentland
  0 siblings, 0 replies; 2+ messages in thread
From: Harry Wentland @ 2019-12-19 14:17 UTC (permalink / raw)
  To: Chen Zhou, harry.wentland, sunpeng.li, alexander.deucher
  Cc: dri-devel, linux-kernel

On 2019-12-19 6:55 a.m., Chen Zhou wrote:
> Fix sparse warning:
> 
> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:964:5:
> 	warning: symbol 'shift_border_left_to_dst' was not declared. Should it be static?
> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:975:6:
> 	warning: symbol 'restore_border_left_from_dst' was not declared. Should it be static?
> 
> Fixes: 89d07b662f5e (drm/amd/display: fix 270 degree rotation for mixed-SLS mode)
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Chen Zhou <chenzhou10@huawei.com>

Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
>  drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
> index 64a0e08f..5843c16 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
> @@ -961,7 +961,7 @@ static void calculate_inits_and_adj_vp(struct pipe_ctx *pipe_ctx)
>   * We also need to make sure pipe_ctx->plane_res.scl_data.h_active uses the
>   * original h_border_left value in its calculation.
>   */
> -int shift_border_left_to_dst(struct pipe_ctx *pipe_ctx)
> +static int shift_border_left_to_dst(struct pipe_ctx *pipe_ctx)
>  {
>  	int store_h_border_left = pipe_ctx->stream->timing.h_border_left;
>  
> @@ -972,7 +972,7 @@ int shift_border_left_to_dst(struct pipe_ctx *pipe_ctx)
>  	return store_h_border_left;
>  }
>  
> -void restore_border_left_from_dst(struct pipe_ctx *pipe_ctx,
> +static void restore_border_left_from_dst(struct pipe_ctx *pipe_ctx,
>                                    int store_h_border_left)
>  {
>  	pipe_ctx->stream->dst.x -= store_h_border_left;
> 

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

end of thread, other threads:[~2019-12-19 14:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-19 11:55 [PATCH next] drm/amd/display: make non-global functions static Chen Zhou
2019-12-19 14:17 ` Harry Wentland

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).