Skip to contentSkip to conversation

drm/amd/display: Remove unused function reverse_planes_order

PATCH Applied Jiapeng Chong 2 participants 2 messages Jun 24, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: Remove unused function reverse_planes_order

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

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -9
index 4b86b30eddc4..1e0e33b565f1 100644
@@ -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
Signature · 1 line
2.20.1.7.g153144c
Applied
#1 lore raw
Quoted 9 lines · Jiapeng Chong

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

Applied. Thanks!

Alex

Quoted 27 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -10
index 4b86b30eddc4..1e0e33b565f1 100644
@@ -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