This patchset aims at fixing various compilation warnings in the AMD GPU driver. All warnings were generated using gcc and the W=1 flag. I decided to deal with them in the same order as the issues were presented in the log, with the exception of those that were about the lack of protypes, which were gathered by a script [1]. Some of these patches were already applied [2], so not all are being sent in this new version. Changes since v1: - Made amdgpu_ras_mca_query_error_status static instead of prototyping it in patch 3/10 - Rewrote function signatures in patch 6/10 - Removed unused functions in patch 6/10 - Removed more unecessary code in patch 9/10 - Reduced patch 10/10 to a minimum [1] - https://pad.riseup.net/p/ZMkzoeO89Kt7R_IC4iAo-keep [2] - https://patchwork.freedesktop.org/series/97701 Isabella Basso (10): drm/amd: Mark IP_BASE definition as __maybe_unused drm/amd: fix improper docstring syntax drm/amdgpu: fix amdgpu_ras_mca_query_error_status scope drm/amdgpu: fix function scopes drm/amdkfd: fix function scopes drm/amd/display: fix function scopes drm/amd: append missing includes drm/amdgpu: fix location of prototype for amdgpu_kms_compat_ioctl drm/amdgpu: remove unnecessary variables drm/amdgpu: re-format file header comments drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 - .../gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 4 +- .../gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.h | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_ioc32.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c | 2 + .../gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 12 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 4 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 2 - drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 2 - drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 4 +- .../drm/amd/amdkfd/kfd_packet_manager_vi.c | 4 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 5 +- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 11 ++- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 18 ++-- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 4 + .../gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 4 +- .../display/dc/clk_mgr/dcn10/rv1_clk_mgr.c | 2 +- .../dc/clk_mgr/dcn10/rv1_clk_mgr_vbios_smu.c | 2 + .../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 2 +- .../dc/clk_mgr/dcn201/dcn201_clk_mgr.c | 43 +------- .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 23 +---- .../dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c | 6 +- .../display/dc/clk_mgr/dcn301/dcn301_smu.c | 6 +- .../display/dc/clk_mgr/dcn301/vg_clk_mgr.c | 20 +--- .../display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c | 7 +- .../amd/display/dc/clk_mgr/dcn31/dcn31_smu.c | 6 +- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 +- .../display/dc/dce110/dce110_hw_sequencer.c | 2 + .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 8 -- .../drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 97 ------------------- .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 29 +++--- .../gpu/drm/amd/display/dc/dcn10/dcn10_opp.c | 30 ------ .../gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 20 +--- .../drm/amd/display/dc/dcn10/dcn10_resource.c | 18 ++-- .../gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c | 14 --- .../drm/amd/display/dc/dcn20/dcn20_dwb_scl.c | 4 +- .../gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c | 7 +- .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 6 +- .../gpu/drm/amd/display/dc/dcn20/dcn20_init.c | 2 + .../gpu/drm/amd/display/dc/dcn20/dcn20_mpc.c | 9 +- .../gpu/drm/amd/display/dc/dcn20/dcn20_optc.c | 57 +---------- .../drm/amd/display/dc/dcn201/dcn201_dccg.c | 3 +- .../drm/amd/display/dc/dcn201/dcn201_hubp.c | 7 +- .../display/dc/dcn201/dcn201_link_encoder.c | 6 +- .../amd/display/dc/dcn201/dcn201_resource.c | 16 ++- .../drm/amd/display/dc/dcn21/dcn21_hubbub.c | 2 +- .../gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c | 15 +-- .../gpu/drm/amd/display/dc/dcn21/dcn21_init.c | 2 + .../amd/display/dc/dcn21/dcn21_link_encoder.c | 9 +- .../drm/amd/display/dc/dcn21/dcn21_resource.c | 31 +++--- .../dc/dcn30/dcn30_dio_stream_encoder.c | 18 +--- .../gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c | 36 ++----- .../gpu/drm/amd/display/dc/dcn30/dcn30_init.c | 2 + .../drm/amd/display/dc/dcn30/dcn30_mmhubbub.c | 2 +- .../gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 2 +- .../drm/amd/display/dc/dcn30/dcn30_resource.c | 12 +-- .../drm/amd/display/dc/dcn301/dcn301_init.c | 2 + .../amd/display/dc/dcn301/dcn301_panel_cntl.c | 10 +- .../amd/display/dc/dcn301/dcn301_resource.c | 45 ++++----- .../drm/amd/display/dc/dcn302/dcn302_init.c | 2 + .../drm/amd/display/dc/dcn303/dcn303_init.c | 2 + .../gpu/drm/amd/display/dc/dcn31/dcn31_dccg.c | 2 +- .../display/dc/dcn31/dcn31_dio_link_encoder.c | 2 +- .../gpu/drm/amd/display/dc/dcn31/dcn31_init.c | 2 + .../amd/display/dc/dcn31/dcn31_panel_cntl.c | 10 +- .../drm/amd/display/dc/dcn31/dcn31_resource.c | 2 +- .../dc/dml/dcn21/display_rq_dlg_calc_21.c | 8 -- .../display/dc/irq/dcn10/irq_service_dcn10.c | 7 +- .../dc/irq/dcn201/irq_service_dcn201.c | 7 +- .../display/dc/irq/dcn21/irq_service_dcn21.c | 7 +- .../display/dc/irq/dcn31/irq_service_dcn31.c | 7 +- .../amd/include/cyan_skillfish_ip_offset.h | 10 +- .../gpu/drm/amd/include/yellow_carp_offset.h | 4 +- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 2 +- 79 files changed, 248 insertions(+), 566 deletions(-) -- 2.34.1