mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Remove unused function reverse_planes_order
@ 2024-06-24  2:22 Jiapeng Chong
  2024-06-24 14:47 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2024-06-24  2:22 UTC (permalink / raw)
  To: alexander.deucher
  Cc: christian.koenig, Xinhui.Pan, airlied, daniel, amd-gfx,
	dri-devel, linux-kernel, Jiapeng Chong, Abaci Robot

The function are defined in the amdgpu_dm.c file, but not called
anywhere, so delete the unused function.

drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:371:20: warning: unused function 'reverse_planes_order'.

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

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 4b86b30eddc4..1e0e33b565f1 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -368,15 +368,6 @@ static inline bool is_dc_timing_adjust_needed(struct dm_crtc_state *old_state,
 		return false;
 }
 
-static inline void reverse_planes_order(struct dc_surface_update *array_of_surface_update,
-					int planes_count)
-{
-	int i, j;
-
-	for (i = 0, j = planes_count - 1; i < j; i++, j--)
-		swap(array_of_surface_update[i], array_of_surface_update[j]);
-}
-
 /*
  * DC will program planes with their z-order determined by their ordering
  * in the dc_surface_updates array. This comparator is used to sort them
-- 
2.20.1.7.g153144c


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

* Re: [PATCH] drm/amd/display: Remove unused function reverse_planes_order
  2024-06-24  2:22 [PATCH] drm/amd/display: Remove unused function reverse_planes_order Jiapeng Chong
@ 2024-06-24 14:47 ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2024-06-24 14:47 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: alexander.deucher, christian.koenig, Xinhui.Pan, airlied, daniel,
	amd-gfx, dri-devel, linux-kernel, Abaci Robot

On Mon, Jun 24, 2024 at 4:07 AM Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> The function are defined in the amdgpu_dm.c file, but not called
> anywhere, so delete the unused function.
>
> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:371:20: warning: unused function 'reverse_planes_order'.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9402
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ---------
>  1 file changed, 9 deletions(-)
>
> 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 4b86b30eddc4..1e0e33b565f1 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -368,15 +368,6 @@ static inline bool is_dc_timing_adjust_needed(struct dm_crtc_state *old_state,
>                 return false;
>  }
>
> -static inline void reverse_planes_order(struct dc_surface_update *array_of_surface_update,
> -                                       int planes_count)
> -{
> -       int i, j;
> -
> -       for (i = 0, j = planes_count - 1; i < j; i++, j--)
> -               swap(array_of_surface_update[i], array_of_surface_update[j]);
> -}
> -
>  /*
>   * DC will program planes with their z-order determined by their ordering
>   * in the dc_surface_updates array. This comparator is used to sort them
> --
> 2.20.1.7.g153144c
>

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

end of thread, other threads:[~2024-06-24 14:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-24  2:22 [PATCH] drm/amd/display: Remove unused function reverse_planes_order Jiapeng Chong
2024-06-24 14:47 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®