Commit f82480fa authored by Gaghik Khachatrian's avatar Gaghik Khachatrian Committed by Alex Deucher
Browse files

drm/amd/display: Fixed Silence complier warnings in dc



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

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

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

Reviewed-by: default avatarDillon Varone <dillon.varone@amd.com>
Reviewed-by: default avatarAustin Zheng <austin.zheng@amd.com>
Signed-off-by: default avatarGaghik Khachatrian <gaghik.khachatrian@amd.com>
Signed-off-by: default avatarChuanyu Tseng <chuanyu.tseng@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 32c1c35b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -503,6 +503,7 @@ struct fixed31_32 dc_fixpt_from_int_dy(unsigned int int_value,
	unsigned int integer_bits,
	unsigned int fractional_bits)
{
	(void)integer_bits;
	struct fixed31_32 fixpt_value = dc_fixpt_from_int(int_value);

	fixpt_value.value |= (long long)frac_value << (FIXED31_32_BITS_PER_FRACTIONAL_PART - fractional_bits);
+1 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ static bool dal_vector_presized_costruct(struct vector *vector,
					 void *initial_value,
					 uint32_t struct_size)
{
	(void)ctx;
	uint32_t i;

	vector->container = NULL;
+1 −0
Original line number Diff line number Diff line
@@ -2696,6 +2696,7 @@ static enum bp_result update_slot_layout_info(struct dc_bios *dcb,
					      struct slot_layout_info *slot_layout_info,
					      unsigned int record_offset)
{
	(void)i;
	unsigned int j;
	struct bios_parser *bp;
	ATOM_BRACKET_LAYOUT_RECORD *record;
+9 −0
Original line number Diff line number Diff line
@@ -205,6 +205,7 @@ static enum bp_result bios_parser_get_src_obj(struct dc_bios *dcb,
	struct graphics_object_id object_id, uint32_t index,
	struct graphics_object_id *src_object_id)
{
	(void)index;
	struct bios_parser *bp = BP_FROM_DCB(dcb);
	unsigned int i;
	enum bp_result bp_result = BP_RESULT_BADINPUT;
@@ -765,6 +766,7 @@ static enum bp_result bios_parser_get_device_tag(
	uint32_t device_tag_index,
	struct connector_device_tag_info *info)
{
	(void)device_tag_index;
	struct bios_parser *bp = BP_FROM_DCB(dcb);
	struct atom_display_object_path_v2 *object;

@@ -809,6 +811,7 @@ static enum bp_result get_ss_info_v4_1(
	uint32_t index,
	struct spread_spectrum_info *ss_info)
{
	(void)index;
	enum bp_result result = BP_RESULT_OK;
	struct atom_display_controller_info_v4_1 *disp_cntl_tbl = NULL;
	struct atom_smu_info_v3_3 *smu_info = NULL;
@@ -897,6 +900,7 @@ static enum bp_result get_ss_info_v4_2(
	uint32_t index,
	struct spread_spectrum_info *ss_info)
{
	(void)index;
	enum bp_result result = BP_RESULT_OK;
	struct atom_display_controller_info_v4_2 *disp_cntl_tbl = NULL;
	struct atom_smu_info_v3_1 *smu_info = NULL;
@@ -977,6 +981,7 @@ static enum bp_result get_ss_info_v4_5(
	uint32_t index,
	struct spread_spectrum_info *ss_info)
{
	(void)index;
	enum bp_result result = BP_RESULT_OK;
	struct atom_display_controller_info_v4_5 *disp_cntl_tbl = NULL;

@@ -1604,6 +1609,8 @@ static uint32_t bios_parser_get_ss_entry_number(
	struct dc_bios *dcb,
	enum as_signal_type signal)
{
	(void)dcb;
	(void)signal;
	/* TODO: DAL2 atomfirmware implementation does not need this.
	 * why DAL3 need this?
	 */
@@ -3536,6 +3543,8 @@ static uint16_t bios_parser_pack_data_tables(
	struct dc_bios *dcb,
	void *dst)
{
	(void)dcb;
	(void)dst;
	// TODO: There is data bytes alignment issue, disable it for now.
	return 0;
}
+2 −0
Original line number Diff line number Diff line
@@ -783,6 +783,8 @@ static enum bp_result external_encoder_control_v3(
	struct bios_parser *bp,
	struct bp_external_encoder_control *cntl)
{
	(void)bp;
	(void)cntl;
	/* TODO */
	return BP_RESULT_OK;
}
Loading