Skip to contentSkip to conversation

drm/amdgpu_dm: tests: Fix wrong variable declaration after merge conflict

PATCH Applied Maxime Ripard 2 participants 3 messages Sep 15

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

PATCH 1/1 drm/amdgpu_dm: tests: Fix wrong variable declaration after merge conflict

Commit 2bcec01cf105 ("drm/amdgpu_dm: Convert to atomic_create_state") converted dm_test_plane_create_state_initializes_state() to call amdgpu_dm_plane_drm_plane_create_state(), which returns a struct drm_plane_state pointer stored in a new plane_state variable.

However, the merge conflict resolution kept the old declaration (struct dm_plane_state *old_state) instead of replacing it with struct drm_plane_state *plane_state, leaving an unused variable with the wrong type.

Fix the declaration to match what the conversion intended.

Fixes 2bcec01cf105 ("drm/amdgpu_dm: Convert to atomic_create_state")

---

Cc Harry Wentland <[email protected]>
Cc Leo Li <[email protected]>
Cc Rodrigo Siqueira <[email protected]>
Cc Alex Deucher <[email protected]>
Cc "Christian König" <[email protected]>
---
 .../gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_plane_test.c  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_plane_test.c +1 -1
index c75a2ef87479..4a2ea3ea2ce5 100644
@@ -2931,11 +2931,11 @@ static const struct drm_plane_funcs dm_test_plane_reset_funcs = {
  * dm_plane_state, and initializes the AMD-specific transfer function and HDR
  * multiplier defaults.
  */
 static void dm_test_plane_create_state_initializes_state(struct kunit *test)
 {
-	struct dm_plane_state *old_state;
+	struct drm_plane_state *plane_state;
 	struct dm_plane_state *new_state;
 	struct drm_plane *plane;
 
 	plane = kunit_kzalloc(test, sizeof(*plane), GFP_KERNEL);
 	KUNIT_ASSERT_NOT_NULL(test, plane);
Signature · 1 line
2.55.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Maxime Ripard

Commit 2bcec01cf105 ("drm/amdgpu_dm: Convert to atomic_create_state") converted dm_test_plane_create_state_initializes_state() to call amdgpu_dm_plane_drm_plane_create_state(), which returns a struct drm_plane_state pointer stored in a new plane_state variable.

However, the merge conflict resolution kept the old declaration (struct dm_plane_state *old_state) instead of replacing it with struct drm_plane_state *plane_state, leaving an unused variable with the wrong type.

Quoted 5 lines

Fix the declaration to match what the conversion intended.

Fixes 2bcec01cf105 ("drm/amdgpu_dm: Convert to atomic_create_state")
author Applied
#2 lore raw
In reply to Maxime Ripard
Quoted 11 lines · Maxime Ripard

Commit 2bcec01cf105 ("drm/amdgpu_dm: Convert to atomic_create_state") converted dm_test_plane_create_state_initializes_state() to call amdgpu_dm_plane_drm_plane_create_state(), which returns a struct drm_plane_state pointer stored in a new plane_state variable.

However, the merge conflict resolution kept the old declaration (struct dm_plane_state *old_state) instead of replacing it with struct drm_plane_state *plane_state, leaving an unused variable with the wrong type.

[...]

Applied to misc/kernel.git (drm-misc-next)

[1/1] drm/amdgpu_dm: tests: Fix wrong variable declaration after merge conflict

      commit: 87882cd6debd94a14c65894e9220be8a01b5d4fa

Thanks!
Maxime