drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_init.c:108:20: warning: initialized field overwritten

From: kernel test robot
Date: Wed Jun 17 2020 - 09:04:02 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 69119673bd50b176ded34032fadd41530fb5af21
commit: 78c7738211e027f122ada3f59c2c5e8a83ee3c59 drm/amd/display: cleanup of function pointer tables
date: 7 months ago
config: i386-randconfig-s001-20200617 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc1-6-g78f577f8-dirty
git checkout 78c7738211e027f122ada3f59c2c5e8a83ee3c59
# save the attached .config to linux build tree
make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_init.c:108:20: warning: initialized field overwritten [-Woverride-init]
108 | .dsc_pg_control = dcn20_dsc_pg_control,
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_init.c:108:20: note: (near initialization for 'dcn21_funcs.dsc_pg_control')
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_init.c:123:6: warning: no previous prototype for 'dcn21_hw_sequencer_construct' [-Wmissing-prototypes]
123 | void dcn21_hw_sequencer_construct(struct dc *dc)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/core_types.h:32,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_hw_sequencer.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_init.c:26:
drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:124:22: warning: 'DP_DVI_CONVERTER_ID_4' defined but not used [-Wunused-const-variable=]
124 | static const uint8_t DP_DVI_CONVERTER_ID_4[] = "m2DVIa";
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:122:22: warning: 'DP_VGA_LVDS_CONVERTER_ID_3' defined but not used [-Wunused-const-variable=]
122 | static const uint8_t DP_VGA_LVDS_CONVERTER_ID_3[] = "dnomlA";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:120:22: warning: 'DP_VGA_LVDS_CONVERTER_ID_2' defined but not used [-Wunused-const-variable=]
120 | static const uint8_t DP_VGA_LVDS_CONVERTER_ID_2[] = "sivarT";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:34,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/core_types.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_hw_sequencer.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_init.c:26:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: 'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=]
76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: 'dc_fixpt_ln2' defined but not used [-Wunused-const-variable=]
75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
| ^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: 'dc_fixpt_e' defined but not used [-Wunused-const-variable=]
74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: 'dc_fixpt_two_pi' defined but not used [-Wunused-const-variable=]
73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: 'dc_fixpt_pi' defined but not used [-Wunused-const-variable=]
72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:67:32: warning: 'dc_fixpt_zero' defined but not used [-Wunused-const-variable=]
67 | static const struct fixed31_32 dc_fixpt_zero = { 0 };
| ^~~~~~~~~~~~~

vim +108 drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_init.c

30
31 static const struct hw_sequencer_funcs dcn21_funcs = {
32 .program_gamut_remap = dcn10_program_gamut_remap,
33 .init_hw = dcn10_init_hw,
34 .init_pipes = dcn10_init_pipes,
35 .apply_ctx_to_hw = dce110_apply_ctx_to_hw,
36 .apply_ctx_for_surface = NULL,
37 .program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
38 .update_plane_addr = dcn20_update_plane_addr,
39 .plane_atomic_disconnect = dcn10_plane_atomic_disconnect,
40 .update_dchub = dcn10_update_dchub,
41 .update_mpcc = dcn20_update_mpcc,
42 .update_pending_status = dcn10_update_pending_status,
43 .set_input_transfer_func = dcn20_set_input_transfer_func,
44 .set_output_transfer_func = dcn20_set_output_transfer_func,
45 .program_output_csc = dcn20_program_output_csc,
46 .power_down = dce110_power_down,
47 .enable_accelerated_mode = dce110_enable_accelerated_mode,
48 .enable_timing_synchronization = dcn10_enable_timing_synchronization,
49 .enable_per_frame_crtc_position_reset = dcn10_enable_per_frame_crtc_position_reset,
50 .update_info_frame = dce110_update_info_frame,
51 .send_immediate_sdp_message = dcn10_send_immediate_sdp_message,
52 .enable_stream = dcn20_enable_stream,
53 .disable_stream = dce110_disable_stream,
54 .unblank_stream = dcn20_unblank_stream,
55 .blank_stream = dce110_blank_stream,
56 .enable_audio_stream = dce110_enable_audio_stream,
57 .disable_audio_stream = dce110_disable_audio_stream,
58 .enable_display_power_gating = dcn10_dummy_display_power_gating,
59 .disable_plane = dcn20_disable_plane,
60 .blank_pixel_data = dcn20_blank_pixel_data,
61 .pipe_control_lock = dcn20_pipe_control_lock,
62 .pipe_control_lock_global = dcn20_pipe_control_lock_global,
63 .prepare_bandwidth = dcn20_prepare_bandwidth,
64 .optimize_bandwidth = dcn20_optimize_bandwidth,
65 .update_bandwidth = dcn20_update_bandwidth,
66 .reset_hw_ctx_wrap = dcn20_reset_hw_ctx_wrap,
67 .enable_stream_timing = dcn20_enable_stream_timing,
68 .set_drr = dcn10_set_drr,
69 .get_position = dcn10_get_position,
70 .set_static_screen_control = dcn10_set_static_screen_control,
71 .setup_stereo = dcn10_setup_stereo,
72 .set_avmute = dce110_set_avmute,
73 .log_hw_state = dcn10_log_hw_state,
74 .get_hw_state = dcn10_get_hw_state,
75 .clear_status_bits = dcn10_clear_status_bits,
76 .wait_for_mpcc_disconnect = dcn10_wait_for_mpcc_disconnect,
77 .edp_backlight_control = dce110_edp_backlight_control,
78 .edp_power_control = dce110_edp_power_control,
79 .edp_wait_for_hpd_ready = dce110_edp_wait_for_hpd_ready,
80 .set_cursor_position = dcn10_set_cursor_position,
81 .set_cursor_attribute = dcn10_set_cursor_attribute,
82 .set_cursor_sdr_white_level = dcn10_set_cursor_sdr_white_level,
83 .disable_stream_gating = dcn20_disable_stream_gating,
84 .enable_stream_gating = dcn20_enable_stream_gating,
85 .setup_periodic_interrupt = dcn10_setup_periodic_interrupt,
86 .setup_vupdate_interrupt = dcn20_setup_vupdate_interrupt,
87 .set_clock = dcn10_set_clock,
88 .get_clock = dcn10_get_clock,
89 .did_underflow_occur = dcn10_did_underflow_occur,
90 .init_blank = dcn20_init_blank,
91 .disable_vga = dcn20_disable_vga,
92 .bios_golden_init = dcn10_bios_golden_init,
93 .plane_atomic_disable = dcn20_plane_atomic_disable,
94 .plane_atomic_power_down = dcn10_plane_atomic_power_down,
95 .enable_power_gating_plane = dcn20_enable_power_gating_plane,
96 .dpp_pg_control = dcn20_dpp_pg_control,
97 .hubp_pg_control = dcn20_hubp_pg_control,
98 .dsc_pg_control = NULL,
99 .program_triplebuffer = dcn20_program_triple_buffer,
100 .enable_writeback = dcn20_enable_writeback,
101 .disable_writeback = dcn20_disable_writeback,
102 .update_odm = dcn20_update_odm,
103 .dmdata_status_done = dcn20_dmdata_status_done,
104 .program_dmdata_engine = dcn20_program_dmdata_engine,
105 .init_sys_ctx = dcn21_init_sys_ctx,
106 .init_vm_ctx = dcn20_init_vm_ctx,
107 .set_flip_control_gsl = dcn20_set_flip_control_gsl,
> 108 .dsc_pg_control = dcn20_dsc_pg_control,
109 .get_surface_visual_confirm_color = dcn10_get_surface_visual_confirm_color,
110 .get_hdr_visual_confirm_color = dcn10_get_hdr_visual_confirm_color,
111 .set_hdr_multiplier = dcn10_set_hdr_multiplier,
112 .verify_allow_pstate_change_high = dcn10_verify_allow_pstate_change_high,
113 .s0i3_golden_init_wa = dcn21_s0i3_golden_init_wa,
114 .optimize_pwr_state = dcn21_optimize_pwr_state,
115 .exit_optimized_pwr_state = dcn21_exit_optimized_pwr_state,
116 .wait_for_blank_complete = dcn20_wait_for_blank_complete,
117 .dccg_init = dcn20_dccg_init,
118 .set_blend_lut = dcn20_set_blend_lut,
119 .set_shaper_3dlut = dcn20_set_shaper_3dlut,
120 .get_vupdate_offset_from_vsync = dcn10_get_vupdate_offset_from_vsync,
121 };
122

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip