diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c index e4396ad8934e..489dd56474b9 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c @@ -42,10 +42,10 @@ static void dm_test_crtc_modeset_required_active_mode_changed(struct kunit *test } /** - * dm_test_crtc_modeset_required_active_active_changed - Test Crtc modeset required active active changed + * dm_test_crtc_modeset_required_active_state_changed - Test modeset required when the active state changes * @test: The KUnit test context */ -static void dm_test_crtc_modeset_required_active_active_changed(struct kunit *test) +static void dm_test_crtc_modeset_required_active_state_changed(struct kunit *test) { struct drm_crtc_state state = {}; @@ -2621,7 +2621,7 @@ static void dm_test_crtc_atomic_check_invalid_stream_fails(struct kunit *test) static struct kunit_case amdgpu_dm_crtc_tests[] = { /* amdgpu_dm_crtc_modeset_required */ KUNIT_CASE(dm_test_crtc_modeset_required_active_mode_changed), - KUNIT_CASE(dm_test_crtc_modeset_required_active_active_changed), + KUNIT_CASE(dm_test_crtc_modeset_required_active_state_changed), KUNIT_CASE(dm_test_crtc_modeset_required_active_connectors_changed), KUNIT_CASE(dm_test_crtc_modeset_required_inactive), KUNIT_CASE(dm_test_crtc_modeset_required_no_changes), diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_plane_test.c b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_plane_test.c index 776272cd93ae..7422e8ba9564 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_plane_test.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_plane_test.c @@ -2448,7 +2448,7 @@ static void dm_test_plane_destroy_state_releases_resources(struct kunit *test) KUNIT_ASSERT_NOT_NULL(test, dc_plane_state); /* destroy_state frees the state itself, so use a plain allocation. */ - dm_plane_state = kzalloc(sizeof(*dm_plane_state), GFP_KERNEL); + dm_plane_state = kzalloc_obj(*dm_plane_state, GFP_KERNEL); KUNIT_ASSERT_NOT_NULL(test, dm_plane_state); /* Hold an extra reference so the release does not free KUnit memory. */ diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_services_test.c b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_services_test.c index 4ff430e4b23b..bdbceb83a8a8 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_services_test.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_services_test.c @@ -337,7 +337,7 @@ static int dm_test_gpu_mem_init(struct kunit *test) { void *cpu_ptr; - cpu_ptr = kunit_kzalloc(test, sizeof(*cpu_ptr), GFP_KERNEL); + cpu_ptr = kunit_kzalloc(test, sizeof(cpu_ptr), GFP_KERNEL); KUNIT_ASSERT_NOT_NULL(test, cpu_ptr); dm_test_bo_ctx = (struct dm_test_bo_ops_ctx) {