mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: remove unused variables otg_inst and cmd
@ 2023-04-20  2:04 Tom Rix
  2023-04-20 14:19 ` Hamza Mahfooz
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2023-04-20  2:04 UTC (permalink / raw)
  To: harry.wentland, sunpeng.li, Rodrigo.Siqueira, alexander.deucher,
	christian.koenig, Xinhui.Pan, airlied, daniel, qingqing.zhuo,
	wenjing.liu, Jun.Lei, Josip.Pavic, Leon.Huang1,
	Nicholas.Kazlauskas
  Cc: amd-gfx, dri-devel, linux-kernel, Tom Rix

gcc reports
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:
  In function ‘dcn21_set_backlight_level’:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:229:18:
  error: unused variable ‘otg_inst’ [-Werror=unused-variable]
  229 |         uint32_t otg_inst = pipe_ctx->stream_res.tg->inst;
      |                  ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:226:27:
  error: unused variable ‘cmd’ [-Werror=unused-variable]
  226 |         union dmub_rb_cmd cmd;
      |                           ^~~

These variables are not used, so remove them.

Fixes: e97cc04fe0fb ("drm/amd/display: refactor dmub commands into single function")
Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c
index 55a464a39529..43463d08f21b 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c
@@ -223,10 +223,8 @@ bool dcn21_set_backlight_level(struct pipe_ctx *pipe_ctx,
 		uint32_t backlight_pwm_u16_16,
 		uint32_t frame_ramp)
 {
-	union dmub_rb_cmd cmd;
 	struct dc_context *dc = pipe_ctx->stream->ctx;
 	struct abm *abm = pipe_ctx->stream_res.abm;
-	uint32_t otg_inst = pipe_ctx->stream_res.tg->inst;
 	struct panel_cntl *panel_cntl = pipe_ctx->stream->link->panel_cntl;
 
 	if (dc->dc->res_pool->dmcu) {
-- 
2.27.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/amd/display: remove unused variables otg_inst and cmd
  2023-04-20  2:04 [PATCH] drm/amd/display: remove unused variables otg_inst and cmd Tom Rix
@ 2023-04-20 14:19 ` Hamza Mahfooz
  0 siblings, 0 replies; 2+ messages in thread
From: Hamza Mahfooz @ 2023-04-20 14:19 UTC (permalink / raw)
  To: Tom Rix, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	alexander.deucher, christian.koenig, Xinhui.Pan, airlied, daniel,
	qingqing.zhuo, wenjing.liu, Jun.Lei, Josip.Pavic, Leon.Huang1,
	Nicholas.Kazlauskas
  Cc: dri-devel, amd-gfx, linux-kernel


On 4/19/23 22:04, Tom Rix wrote:
> gcc reports
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:
>    In function ‘dcn21_set_backlight_level’:
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:229:18:
>    error: unused variable ‘otg_inst’ [-Werror=unused-variable]
>    229 |         uint32_t otg_inst = pipe_ctx->stream_res.tg->inst;
>        |                  ^~~~~~~~
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:226:27:
>    error: unused variable ‘cmd’ [-Werror=unused-variable]
>    226 |         union dmub_rb_cmd cmd;
>        |                           ^~~
> 
> These variables are not used, so remove them.
> 
> Fixes: e97cc04fe0fb ("drm/amd/display: refactor dmub commands into single function")
> Signed-off-by: Tom Rix <trix@redhat.com>

This has already been fixed, as of commit 1adb4dd5bd4b
("drm/amd/display: Remove unused variables in dcn21_hwseq.c") in
amd-staging-drm-next.

> ---
>   drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c
> index 55a464a39529..43463d08f21b 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c
> @@ -223,10 +223,8 @@ bool dcn21_set_backlight_level(struct pipe_ctx *pipe_ctx,
>   		uint32_t backlight_pwm_u16_16,
>   		uint32_t frame_ramp)
>   {
> -	union dmub_rb_cmd cmd;
>   	struct dc_context *dc = pipe_ctx->stream->ctx;
>   	struct abm *abm = pipe_ctx->stream_res.abm;
> -	uint32_t otg_inst = pipe_ctx->stream_res.tg->inst;
>   	struct panel_cntl *panel_cntl = pipe_ctx->stream->link->panel_cntl;
>   
>   	if (dc->dc->res_pool->dmcu) {
-- 
Hamza


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-20 14:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-20  2:04 [PATCH] drm/amd/display: remove unused variables otg_inst and cmd Tom Rix
2023-04-20 14:19 ` Hamza Mahfooz

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®