mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Caio Novais <caionovais@usp.br>
To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Cc: "Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Pan, Xinhui" <Xinhui.Pan@amd.com>,
	"David Airlie" <airlied@gmail.com>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Leo Li" <sunpeng.li@amd.com>,
	"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
	"Jack Xiao" <Jack.Xiao@amd.com>,
	"Hawking Zhang" <Hawking.Zhang@amd.com>, "Le Ma" <le.ma@amd.com>,
	"Mario Limonciello" <mario.limonciello@amd.com>,
	"Yifan Zhang" <yifan1.zhang@amd.com>,
	"Mukul Joshi" <mukul.joshi@amd.com>, "Jun Lei" <Jun.Lei@amd.com>,
	"Wenjing Liu" <wenjing.liu@amd.com>,
	"Alan Liu" <HaoPing.Liu@amd.com>,
	"Caio Novais" <caionovais@usp.br>,
	"Joshua Ashton" <joshua@froggi.es>,
	"Guo Zhengkui" <guozhengkui@vivo.com>,
	"Nicholas Kazlauskas" <Nicholas.Kazlauskas@amd.com>,
	"Zhan Liu" <zhan.liu@amd.com>, "Wayne Lin" <wayne.lin@amd.com>,
	"Charlene Liu" <Charlene.Liu@amd.com>,
	"Martin Leung" <Martin.Leung@amd.com>,
	"Tom Chung" <chiahsuan.chung@amd.com>,
	"Alvin Lee" <alvin.lee2@amd.com>,
	"George Shen" <George.Shen@amd.com>,
	"Qingqing Zhuo" <qingqing.zhuo@amd.com>,
	"Roman Li" <Roman.Li@amd.com>,
	"Wesley Chalmers" <Wesley.Chalmers@amd.com>,
	"Aurabindo Pillai" <aurabindo.pillai@amd.com>,
	"Jingwen Zhu" <Jingwen.Zhu@amd.com>,
	"Melissa Wen" <mwen@igalia.com>,
	"Felipe Clark" <felipe.clark@amd.com>,
	"Sung Joon Kim" <sungjoon.kim@amd.com>,
	"Dillon Varone" <Dillon.Varone@amd.com>,
	"Ethan Wellenreiter" <Ethan.Wellenreiter@amd.com>,
	"Taimur Hassan" <Syed.Hassan@amd.com>,
	"Maíra Canal" <mairacanal@riseup.net>,
	"Brian Chang" <Brian.Chang@amd.com>,
	"Gabe Teeger" <gabe.teeger@amd.com>,
	"André Almeida" <andrealmeid@igalia.com>,
	"Chaitanya Dhere" <chaitanya.dhere@amd.com>,
	"Jiapeng Chong" <jiapeng.chong@linux.alibaba.com>,
	"Ryan Lin" <tsung-hua.lin@amd.com>,
	"Hamza Mahfooz" <hamza.mahfooz@amd.com>
Subject: [PATCH 12/12] drm/amd/display: Remove two unused variables 'result_write_min_hblank' and 'hblank_size'
Date: Mon, 27 Mar 2023 20:33:53 -0300	[thread overview]
Message-ID: <20230327233353.64081-13-caionovais@usp.br> (raw)
In-Reply-To: <20230327233353.64081-1-caionovais@usp.br>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 2079 bytes --]

Compiling AMD GPU drivers displays a warning:

drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capability.c: In function ‘dpcd_set_source_specific_data’:
drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capability.c:1290:32: warning: variable ‘result_write_min_hblank’ set but not used [-Wunused-but-set-variable]

Get rid of it by removing the variable 'result_write_min_hblank' and 'hblank_size'.

Signed-off-by: Caio Novais <caionovais@usp.br>
---
 .../drm/amd/display/dc/link/protocols/link_dp_capability.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
index d4370856f164..7392fcf17653 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
@@ -1287,7 +1287,6 @@ void dc_link_overwrite_extended_receiver_cap(
 void dpcd_set_source_specific_data(struct dc_link *link)
 {
 	if (!link->dc->vendor_signature.is_valid) {
-		enum dc_status result_write_min_hblank = DC_NOT_SUPPORTED;
 		struct dpcd_amd_signature amd_signature = {0};
 		struct dpcd_amd_device_id amd_device_id = {0};
 
@@ -1324,16 +1323,10 @@ void dpcd_set_source_specific_data(struct dc_link *link)
 		if (link->ctx->dce_version >= DCN_VERSION_2_0 &&
 			link->dc->caps.min_horizontal_blanking_period != 0) {
 
-			uint8_t hblank_size = (uint8_t)link->dc->caps.min_horizontal_blanking_period;
-
-			result_write_min_hblank = core_link_write_dpcd(link,
-				DP_SOURCE_MINIMUM_HBLANK_SUPPORTED, (uint8_t *)(&hblank_size),
-				sizeof(hblank_size));
 		}
 		DC_TRACE_LEVEL_MESSAGE(DAL_TRACE_LEVEL_INFORMATION,
 							WPP_BIT_FLAG_DC_DETECTION_DP_CAPS,
 							"result=%u link_index=%u enum dce_version=%d DPCD=0x%04X min_hblank=%u branch_dev_id=0x%x branch_dev_name='%c%c%c%c%c%c'",
-							result_write_min_hblank,
 							link->link_index,
 							link->ctx->dce_version,
 							DP_SOURCE_MINIMUM_HBLANK_SUPPORTED,
-- 
2.40.0


  parent reply	other threads:[~2023-03-27 23:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27 23:33 [PATCH 00/12] drm/amd: Remove unused variables Caio Novais
2023-03-27 23:33 ` [PATCH 01/12] drm/amd: Remove unused variable 'r' Caio Novais
2023-03-27 23:46   ` Alex Deucher
2023-03-27 23:33 ` [PATCH 02/12] drm/amd: Remove unused variable 'value0' Caio Novais
2023-03-27 23:48   ` Alex Deucher
2023-03-27 23:33 ` [PATCH 03/12] drm/amd/display: Remove unused variable 'pixel_width' Caio Novais
2023-03-27 23:33 ` [PATCH 04/12] drm/amd/display: Remove unused variable 'hubp' Caio Novais
2023-03-27 23:33 ` [PATCH 05/12] drm/amd/display: Remove unused variable 'speakers' Caio Novais
2023-03-27 23:33 ` [PATCH 06/12] drm/amd/display: Remove unused variable 'mc_vm_apt_default' Caio Novais
2023-03-27 23:33 ` [PATCH 07/12] drm/amd/display: Remove unused variable 'optc' Caio Novais
2023-03-27 23:33 ` [PATCH 08/12] drm/amd/display: Remove two unused variables 'speakers' and 'channels' and remove unused function 'speakers_to_channels' Caio Novais
2023-03-27 23:33 ` [PATCH 09/12] drm/amd/display: Remove two unused variables 'is_pipe_split_expected' and 'state' Caio Novais
2023-03-27 23:50   ` Alex Deucher
2023-03-27 23:33 ` [PATCH 10/12] drm/amd/display: Remove unused variable 'cursor_bpp' Caio Novais
2023-03-27 23:33 ` [PATCH 11/12] drm/amd/display: Remove unused variable 'scl_enable' Caio Novais
2023-03-27 23:33 ` Caio Novais [this message]
2023-03-27 23:53   ` [PATCH 12/12] drm/amd/display: Remove two unused variables 'result_write_min_hblank' and 'hblank_size' Alex Deucher
2023-03-28 10:16 ` [PATCH 00/12] drm/amd: Remove unused variables Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230327233353.64081-13-caionovais@usp.br \
    --to=caionovais@usp.br \
    --cc=Brian.Chang@amd.com \
    --cc=Charlene.Liu@amd.com \
    --cc=Dillon.Varone@amd.com \
    --cc=Ethan.Wellenreiter@amd.com \
    --cc=George.Shen@amd.com \
    --cc=HaoPing.Liu@amd.com \
    --cc=Hawking.Zhang@amd.com \
    --cc=Jack.Xiao@amd.com \
    --cc=Jingwen.Zhu@amd.com \
    --cc=Jun.Lei@amd.com \
    --cc=Martin.Leung@amd.com \
    --cc=Nicholas.Kazlauskas@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Roman.Li@amd.com \
    --cc=Syed.Hassan@amd.com \
    --cc=Wesley.Chalmers@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=alvin.lee2@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=andrealmeid@igalia.com \
    --cc=aurabindo.pillai@amd.com \
    --cc=chaitanya.dhere@amd.com \
    --cc=chiahsuan.chung@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=felipe.clark@amd.com \
    --cc=gabe.teeger@amd.com \
    --cc=guozhengkui@vivo.com \
    --cc=hamza.mahfooz@amd.com \
    --cc=harry.wentland@amd.com \
    --cc=jiapeng.chong@linux.alibaba.com \
    --cc=joshua@froggi.es \
    --cc=le.ma@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mairacanal@riseup.net \
    --cc=mario.limonciello@amd.com \
    --cc=mukul.joshi@amd.com \
    --cc=mwen@igalia.com \
    --cc=qingqing.zhuo@amd.com \
    --cc=sungjoon.kim@amd.com \
    --cc=sunpeng.li@amd.com \
    --cc=tsung-hua.lin@amd.com \
    --cc=wayne.lin@amd.com \
    --cc=wenjing.liu@amd.com \
    --cc=yifan1.zhang@amd.com \
    --cc=zhan.liu@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®