Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display: Fix Silence warnings

Also affects: freesync, hdcp, info_packet, power

[Why] Resolve compiler warnings by marking unused parameters explicitly.

[How] In .c/.h keep parameter names in signatures and add a line with
`(void)param;` inside the function body

Preserved function signatures and avoids breaking code paths that
may reference the parameter under conditional compilation.

Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Signed-off-by: Gaghik Khachatrian <gaghik.khachatrian@amd.com>
Signed-off-by: Chuanyu Tseng <chuanyu.tseng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Gaghik Khachatrian and committed by
Alex Deucher
60e8ffaf a3c7ab16

+9
+2
drivers/gpu/drm/amd/display/modules/color/color_gamma.c
··· 896 896 uint32_t hw_points_num, 897 897 const struct hw_x_point *coordinate_x) 898 898 { 899 + (void)coordinate_x; 899 900 uint32_t i; 900 901 struct fixed31_32 output; 901 902 struct fixed31_32 *de_pq_table = mod_color_get_table(type_de_pq_table); ··· 1340 1339 const struct dc_gamma *ramp, 1341 1340 struct dividers dividers) 1342 1341 { 1342 + (void)dividers; 1343 1343 uint32_t i; 1344 1344 struct fixed31_32 min = dc_fixpt_zero; 1345 1345 struct fixed31_32 max = dc_fixpt_one;
+6
drivers/gpu/drm/amd/display/modules/freesync/freesync.c
··· 114 114 const struct mod_vrr_params *in_vrr, 115 115 unsigned int v_total) 116 116 { 117 + (void)in_vrr; 117 118 unsigned int duration_in_us = 118 119 (unsigned int)(div64_u64(((unsigned long long)(v_total) 119 120 * 10000) * stream->timing.h_total, ··· 219 218 const struct dc_stream_state *stream, 220 219 struct mod_vrr_params *in_out_vrr) 221 220 { 221 + (void)core_freesync; 222 222 unsigned int v_total = 0; 223 223 unsigned int current_duration_in_us = 224 224 calc_duration_in_us_from_v_total( ··· 294 292 unsigned int last_render_time_in_us, 295 293 struct mod_vrr_params *in_out_vrr) 296 294 { 295 + (void)core_freesync; 297 296 unsigned int inserted_frame_duration_in_us = 0; 298 297 unsigned int mid_point_frames_ceil = 0; 299 298 unsigned int mid_point_frames_floor = 0; ··· 450 447 unsigned int last_render_time_in_us, 451 448 struct mod_vrr_params *in_out_vrr) 452 449 { 450 + (void)core_freesync; 453 451 bool update = false; 454 452 unsigned int max_render_time_in_us = in_out_vrr->max_duration_in_us; 455 453 ··· 549 545 unsigned int max_refresh_in_uhz, 550 546 struct mod_vrr_params *in_vrr) 551 547 { 548 + (void)core_freesync; 552 549 if (in_vrr->state != in_config->state) { 553 550 return true; 554 551 } else if (in_vrr->state == VRR_STATE_ACTIVE_FIXED && ··· 951 946 struct dc_info_packet *infopacket, 952 947 bool pack_sdp_v1_3) 953 948 { 949 + (void)mod_freesync; 954 950 /* SPD info packet for FreeSync 955 951 * VTEM info packet for HdmiVRR 956 952 * Check if Freesync is supported. Return if false. If true,
+1
drivers/gpu/drm/amd/display/modules/hdcp/hdcp.h
··· 501 501 static inline void set_watchdog_in_ms(struct mod_hdcp *hdcp, uint16_t time, 502 502 struct mod_hdcp_output *output) 503 503 { 504 + (void)hdcp; 504 505 output->watchdog_timer_needed = 1; 505 506 output->watchdog_timer_delay = time; 506 507 }