Skip to content

Commit 0016e87

Browse files
amd-sukhatrialexdeucher
authored andcommitted
drm/amdgpu: Clean the functions pointer set as NULL
We dont need to set the functions to NULL which arent needed as global structure members are by default set to zero or NULL for pointers. Cc: Leo Liu <[email protected]> Signed-off-by: Sunil Khatri <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 8231e3a commit 0016e87

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+0
-228
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -603,8 +603,6 @@ static int acp_set_powergating_state(void *handle,
603603

604604
static const struct amd_ip_funcs acp_ip_funcs = {
605605
.name = "acp_ip",
606-
.early_init = NULL,
607-
.late_init = NULL,
608606
.sw_init = acp_sw_init,
609607
.sw_fini = acp_sw_fini,
610608
.hw_init = acp_hw_init,
@@ -614,8 +612,6 @@ static const struct amd_ip_funcs acp_ip_funcs = {
614612
.is_idle = acp_is_idle,
615613
.set_clockgating_state = acp_set_clockgating_state,
616614
.set_powergating_state = acp_set_powergating_state,
617-
.dump_ip_state = NULL,
618-
.print_ip_state = NULL,
619615
};
620616

621617
const struct amdgpu_ip_block_version acp_ip_block = {

drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ static int isp_set_powergating_state(void *handle,
143143
static const struct amd_ip_funcs isp_ip_funcs = {
144144
.name = "isp_ip",
145145
.early_init = isp_early_init,
146-
.late_init = NULL,
147146
.hw_init = isp_hw_init,
148147
.hw_fini = isp_hw_fini,
149148
.is_idle = isp_is_idle,

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4095,17 +4095,12 @@ const struct attribute_group amdgpu_flash_attr_group = {
40954095
const struct amd_ip_funcs psp_ip_funcs = {
40964096
.name = "psp",
40974097
.early_init = psp_early_init,
4098-
.late_init = NULL,
40994098
.sw_init = psp_sw_init,
41004099
.sw_fini = psp_sw_fini,
41014100
.hw_init = psp_hw_init,
41024101
.hw_fini = psp_hw_fini,
41034102
.suspend = psp_suspend,
41044103
.resume = psp_resume,
4105-
.is_idle = NULL,
4106-
.check_soft_reset = NULL,
4107-
.wait_for_idle = NULL,
4108-
.soft_reset = NULL,
41094104
.set_clockgating_state = psp_set_clockgating_state,
41104105
.set_powergating_state = psp_set_powergating_state,
41114106
};

drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -993,8 +993,6 @@ static const struct amd_ip_funcs umsch_mm_v4_0_ip_funcs = {
993993
.hw_fini = umsch_mm_hw_fini,
994994
.suspend = umsch_mm_suspend,
995995
.resume = umsch_mm_resume,
996-
.dump_ip_state = NULL,
997-
.print_ip_state = NULL,
998996
};
999997

1000998
const struct amdgpu_ip_block_version umsch_mm_v4_0_ip_block = {

drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -646,8 +646,6 @@ static int amdgpu_vkms_set_powergating_state(void *handle,
646646

647647
static const struct amd_ip_funcs amdgpu_vkms_ip_funcs = {
648648
.name = "amdgpu_vkms",
649-
.early_init = NULL,
650-
.late_init = NULL,
651649
.sw_init = amdgpu_vkms_sw_init,
652650
.sw_fini = amdgpu_vkms_sw_fini,
653651
.hw_init = amdgpu_vkms_hw_init,
@@ -657,8 +655,6 @@ static const struct amd_ip_funcs amdgpu_vkms_ip_funcs = {
657655
.is_idle = amdgpu_vkms_is_idle,
658656
.set_clockgating_state = amdgpu_vkms_set_clockgating_state,
659657
.set_powergating_state = amdgpu_vkms_set_powergating_state,
660-
.dump_ip_state = NULL,
661-
.print_ip_state = NULL,
662658
};
663659

664660
const struct amdgpu_ip_block_version amdgpu_vkms_ip_block = {

drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -906,14 +906,12 @@ static void vpe_set_ring_funcs(struct amdgpu_device *adev)
906906
const struct amd_ip_funcs vpe_ip_funcs = {
907907
.name = "vpe_v6_1",
908908
.early_init = vpe_early_init,
909-
.late_init = NULL,
910909
.sw_init = vpe_sw_init,
911910
.sw_fini = vpe_sw_fini,
912911
.hw_init = vpe_hw_init,
913912
.hw_fini = vpe_hw_fini,
914913
.suspend = vpe_suspend,
915914
.resume = vpe_resume,
916-
.soft_reset = NULL,
917915
.set_clockgating_state = vpe_set_clockgating_state,
918916
.set_powergating_state = vpe_set_powergating_state,
919917
};

drivers/gpu/drm/amd/amdgpu/cik.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,16 +2176,13 @@ static int cik_common_set_powergating_state(void *handle,
21762176
static const struct amd_ip_funcs cik_common_ip_funcs = {
21772177
.name = "cik_common",
21782178
.early_init = cik_common_early_init,
2179-
.late_init = NULL,
21802179
.hw_init = cik_common_hw_init,
21812180
.hw_fini = cik_common_hw_fini,
21822181
.resume = cik_common_resume,
21832182
.is_idle = cik_common_is_idle,
21842183
.soft_reset = cik_common_soft_reset,
21852184
.set_clockgating_state = cik_common_set_clockgating_state,
21862185
.set_powergating_state = cik_common_set_powergating_state,
2187-
.dump_ip_state = NULL,
2188-
.print_ip_state = NULL,
21892186
};
21902187

21912188
static const struct amdgpu_ip_block_version cik_common_ip_block =

drivers/gpu/drm/amd/amdgpu/cik_ih.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,6 @@ static int cik_ih_set_powergating_state(void *handle,
417417
static const struct amd_ip_funcs cik_ih_ip_funcs = {
418418
.name = "cik_ih",
419419
.early_init = cik_ih_early_init,
420-
.late_init = NULL,
421420
.sw_init = cik_ih_sw_init,
422421
.sw_fini = cik_ih_sw_fini,
423422
.hw_init = cik_ih_hw_init,
@@ -429,8 +428,6 @@ static const struct amd_ip_funcs cik_ih_ip_funcs = {
429428
.soft_reset = cik_ih_soft_reset,
430429
.set_clockgating_state = cik_ih_set_clockgating_state,
431430
.set_powergating_state = cik_ih_set_powergating_state,
432-
.dump_ip_state = NULL,
433-
.print_ip_state = NULL,
434431
};
435432

436433
static const struct amdgpu_ih_funcs cik_ih_funcs = {

drivers/gpu/drm/amd/amdgpu/cik_sdma.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,6 @@ static int cik_sdma_set_powergating_state(void *handle,
12131213
static const struct amd_ip_funcs cik_sdma_ip_funcs = {
12141214
.name = "cik_sdma",
12151215
.early_init = cik_sdma_early_init,
1216-
.late_init = NULL,
12171216
.sw_init = cik_sdma_sw_init,
12181217
.sw_fini = cik_sdma_sw_fini,
12191218
.hw_init = cik_sdma_hw_init,
@@ -1225,8 +1224,6 @@ static const struct amd_ip_funcs cik_sdma_ip_funcs = {
12251224
.soft_reset = cik_sdma_soft_reset,
12261225
.set_clockgating_state = cik_sdma_set_clockgating_state,
12271226
.set_powergating_state = cik_sdma_set_powergating_state,
1228-
.dump_ip_state = NULL,
1229-
.print_ip_state = NULL,
12301227
};
12311228

12321229
static const struct amdgpu_ring_funcs cik_sdma_ring_funcs = {

drivers/gpu/drm/amd/amdgpu/cz_ih.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,6 @@ static int cz_ih_set_powergating_state(void *handle,
415415
static const struct amd_ip_funcs cz_ih_ip_funcs = {
416416
.name = "cz_ih",
417417
.early_init = cz_ih_early_init,
418-
.late_init = NULL,
419418
.sw_init = cz_ih_sw_init,
420419
.sw_fini = cz_ih_sw_fini,
421420
.hw_init = cz_ih_hw_init,
@@ -427,8 +426,6 @@ static const struct amd_ip_funcs cz_ih_ip_funcs = {
427426
.soft_reset = cz_ih_soft_reset,
428427
.set_clockgating_state = cz_ih_set_clockgating_state,
429428
.set_powergating_state = cz_ih_set_powergating_state,
430-
.dump_ip_state = NULL,
431-
.print_ip_state = NULL,
432429
};
433430

434431
static const struct amdgpu_ih_funcs cz_ih_funcs = {

0 commit comments

Comments
 (0)