Skip to contentSkip to conversation

drm/amd/display: remove some set but not used variables

PATCH Applied zhengbin 3 participants 7 messages Nov 14, 2019 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

zhengbin

author
#0 lore raw

cover drm/amd/display: remove some set but not used variables

zhengbin (4):
drm/amd/display: remove set but not used variable 'old_plane_crtc' drm/amd/display: remove set but not used variable 'bp' in
bios_parser2.c
drm/amd/display: remove set but not used variable 'bp' in
bios_parser.c
drm/amd/display: remove set but not used variable 'min_content'

 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c       | 3 +--
 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c       | 2 --
 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c      | 2 --
 drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 --
 4 files changed, 1 insertion(+), 8 deletions(-)

--
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1573734987-119703-1-git-send-email-zhengbin13-hv44wF8Li93QT0dZR+AlfA@public.gmane.org

author
#2 lore raw

PATCH 1/4 drm/amd/display: remove set but not used variable 'old_plane_crtc'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c: In function dm_determine_update_type_for_commit:
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:6516:36: warning: variable old_plane_crtc set but not used [-Wunused-but-set-variable]

It is introduced by commit a87fa9938749 ("drm/amd/display:
Build stream update and plane updates in dm"), but never used, so remove it.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -2
index c2700bc..700cbd5 100644
@@ -7611,7 +7611,7 @@ dm_determine_update_type_for_commit(struct amdgpu_display_manager *dm,
 	int i, j, num_plane, ret = 0;
 	struct drm_plane_state *old_plane_state, *new_plane_state;
 	struct dm_plane_state *new_dm_plane_state, *old_dm_plane_state;
-	struct drm_crtc *new_plane_crtc, *old_plane_crtc;
+	struct drm_crtc *new_plane_crtc;
 	struct drm_plane *plane;
 
 	struct drm_crtc *crtc;
@@ -7657,7 +7657,6 @@ dm_determine_update_type_for_commit(struct amdgpu_display_manager *dm,
 			uint64_t tiling_flags;
 
 			new_plane_crtc = new_plane_state->crtc;
-			old_plane_crtc = old_plane_state->crtc;
 			new_dm_plane_state = to_dm_plane_state(new_plane_state);
 			old_dm_plane_state = to_dm_plane_state(old_plane_state);
 

--
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

author
#3 lore raw

PATCH 2/4 drm/amd/display: remove set but not used variable 'bp' in bios_parser2.c

In reply to a message not in the archive

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c: In function bios_get_board_layout_info:
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c:1826:22: warning: variable bp set but not used [-Wunused-but-set-variable]

It is introduced by commit 1eeedbcc20d6 ("drm/amd/display:
get board layout for edid emulation"), but never used, so remove it.

---
 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +0 -2
index 6e29ba8..9dc8d4e 100644
@@ -1838,7 +1838,6 @@ static enum bp_result bios_get_board_layout_info(
 	struct board_layout_info *board_layout_info)
 {
 	unsigned int i;
-	struct bios_parser *bp;
 	enum bp_result record_result;
 
 	const unsigned int slot_index_to_vbios_id[MAX_BOARD_SLOTS] = {
@@ -1847,7 +1846,6 @@ static enum bp_result bios_get_board_layout_info(
 		0, 0
 	};
 
-	bp = BP_FROM_DCB(dcb);
 	if (board_layout_info == NULL) {
 		DC_LOG_DETECTION_EDID_PARSER("Invalid board_layout_info\n");
 		return BP_RESULT_BADINPUT;

--
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

author
#4 lore raw

PATCH 3/4 drm/amd/display: remove set but not used variable 'bp' in bios_parser.c

In reply to a message not in the archive

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/display/dc/bios/bios_parser.c: In function bios_get_board_layout_info:
drivers/gpu/drm/amd/display/dc/bios/bios_parser.c:2743:22: warning: variable bp set but not used [-Wunused-but-set-variable]

It is introduced by commit 1eeedbcc20d6 ("drm/amd/display:
get board layout for edid emulation"), but never used, so remove it.

---
 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/dc/bios/bios_parser.c +0 -2
index 823843c..c34797c 100644
@@ -2739,7 +2739,6 @@ static enum bp_result bios_get_board_layout_info(
 	struct board_layout_info *board_layout_info)
 {
 	unsigned int i;
-	struct bios_parser *bp;
 	enum bp_result record_result;
 
 	const unsigned int slot_index_to_vbios_id[MAX_BOARD_SLOTS] = {
@@ -2748,7 +2747,6 @@ static enum bp_result bios_get_board_layout_info(
 		0, 0
 	};
 
-	bp = BP_FROM_DCB(dcb);
 	if (board_layout_info == NULL) {
 		DC_LOG_DETECTION_EDID_PARSER("Invalid board_layout_info\n");
 		return BP_RESULT_BADINPUT;

--
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

author
#5 lore raw

PATCH 4/4 drm/amd/display: remove set but not used variable 'min_content'

In reply to a message not in the archive

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/display/modules/color/color_gamma.c: In function build_freesync_hdr:
drivers/gpu/drm/amd/display/modules/color/color_gamma.c:830:20: warning: variable min_content set but not used [-Wunused-but-set-variable]

It is not used since commit 50575eb5b339 ("drm/amd/display:
Only use EETF when maxCL > max display")

---
 drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/modules/color/color_gamma.c +0 -2
index 1de4805..9b121b0 100644
@@ -937,7 +937,6 @@ static bool build_freesync_hdr(struct pwl_float_data_ex *rgb_regamma,
 	struct fixed31_32 max_display;
 	struct fixed31_32 min_display;
 	struct fixed31_32 max_content;
-	struct fixed31_32 min_content;
 	struct fixed31_32 clip = dc_fixpt_one;
 	struct fixed31_32 output;
 	bool use_eetf = false;
@@ -951,7 +950,6 @@ static bool build_freesync_hdr(struct pwl_float_data_ex *rgb_regamma,
 	max_display = dc_fixpt_from_int(fs_params->max_display);
 	min_display = dc_fixpt_from_fraction(fs_params->min_display, 10000);
 	max_content = dc_fixpt_from_int(fs_params->max_content);
-	min_content = dc_fixpt_from_fraction(fs_params->min_content, 10000);
 	sdr_white_level = dc_fixpt_from_int(fs_params->sdr_white_level);
 
 	if (fs_params->min_display > 1000) // cap at 0.1 at the bottom

--
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by on the v1 series
#6 lore raw
In reply to zhengbin
Quoted 8 lines · zhengbin

zhengbin (4):
drm/amd/display: remove set but not used variable 'old_plane_crtc' drm/amd/display: remove set but not used variable 'bp' in
bios_parser2.c
drm/amd/display: remove set but not used variable 'bp' in
bios_parser.c
drm/amd/display: remove set but not used variable 'min_content'

These would be fine as a single patch as well but I don't have a strong preference either way.

Patches are:

Harry

Quoted 9 lines
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c       | 3 +--
 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c       | 2 --
 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c      | 2 --
 drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 --
 4 files changed, 1 insertion(+), 8 deletions(-)

--
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Applied
#7 lore raw
Quoted 11 lines · Harry Wentland
Quoted 8 lines · zhengbin

zhengbin (4):
drm/amd/display: remove set but not used variable 'old_plane_crtc' drm/amd/display: remove set but not used variable 'bp' in
bios_parser2.c
drm/amd/display: remove set but not used variable 'bp' in
bios_parser.c
drm/amd/display: remove set but not used variable 'min_content'

Quoted 5 lines

These would be fine as a single patch as well but I don't have a strong preference either way.

Patches are:

Applied. Thanks!

Alex

Quoted 9 lines

Harry

Quoted 6 lines
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c       | 3 +--
 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c       | 2 --
 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c      | 2 --
 drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 --
 4 files changed, 1 insertion(+), 8 deletions(-)
Quoted 7 lines
Quoted 3 lines

--
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel