drm/amd/display: Remove a unused variable and mark a function as static
v2 cover drm/amd/display: Remove a unused variable and mark a function as static
This patchset removes one unused variable and mark a function as static.
Caio Novais (2):
drm/amd/display: Remove unused variable 'scl_enable' drm/amd/display: Mark function
'optc3_wait_drr_doublebuffer_pending_clear' as static
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.c | 2 +- .../gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-)
Signature · 1 line
2.40.0
PATCH v2 1/2 drm/amd/display: Remove unused variable 'scl_enable'
Compiling AMD GPU drivers displays a warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_rq_dlg_calc_314.c: In function ‘dml_rq_dlg_get_dlg_params’:drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_rq_dlg_calc_314.c:991:14: warning: variable ‘scl_enable’ set but not used [-Wunused-but-set-variable]
Get rid of it by removing the variable 'scl_enable'.
--- .../gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c +0 -2
@@ -988,7 +988,6 @@ static void dml_rq_dlg_get_dlg_params(double hratio_c;double vratio_l;double vratio_c; -bool scl_enable;unsigned int swath_width_ub_l;unsigned int dpte_groups_per_row_ub_l;
@@ -1117,7 +1116,6 @@ static void dml_rq_dlg_get_dlg_params( hratio_c = scl->hscl_ratio_c; vratio_l = scl->vscl_ratio; vratio_c = scl->vscl_ratio_c; - scl_enable = scl->scl_enable; swath_width_ub_l = rq_dlg_param->rq_l.swath_width_ub; dpte_groups_per_row_ub_l = rq_dlg_param->rq_l.dpte_groups_per_row_ub;
Signature · 1 line
2.40.0
PATCH v2 2/2 drm/amd/display: Mark function 'optc3_wait_drr_doublebuffer_pending_clear' as static
In reply to Caio NovaisCompiling AMD GPU drivers displays a warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_optc.c:294:6: warning: no previous prototype for ‘optc3_wait_drr_doublebuffer_pending_clear’ [-Wmissing-prototypes]
Get rid of it by marking the function as static
--- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.c +1 -1
@@ -291,7 +291,7 @@ static void optc3_set_timing_double_buffer(struct timing_generator *optc, bool e OTG_DRR_TIMING_DBUF_UPDATE_MODE, mode); } -void optc3_wait_drr_doublebuffer_pending_clear (struct timing_generator *optc) +static void optc3_wait_drr_doublebuffer_pending_clear (struct timing_generator *optc) {struct optc *optc1 =DCN10TG_FROM_TG (optc);
Signature · 1 line
2.40.0
Hamza Mahfooz
AppliedRe: [PATCH v2 2/2] drm/amd/display: Mark function 'optc3_wait_drr_doublebuffer_pending_clear' as static
Quoted 7 lines · Caio Novais
Compiling AMD GPU drivers displays a warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_optc.c:294:6: warning: no previous prototype for ‘optc3_wait_drr_doublebuffer_pending_clear’ [-Wmissing-prototypes]Get rid of it by marking the function as static
Signed-off-by Caio Novais <[email protected]>
Applied, thanks!
Quoted 17 lines
--- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.c +1
-1@@ -291,7 +291,7 @@ static void optc3_set_timing_double_buffer(struct timing_generator *optc, bool e OTG_DRR_TIMING_DBUF_UPDATE_MODE, mode); } -void optc3_wait_drr_doublebuffer_pending_clear (struct timing_generator *optc) +static void optc3_wait_drr_doublebuffer_pending_clear (struct timing_generator *optc) {struct optc *optc1 =DCN10TG_FROM_TG (optc);
Signature · 1 line
Hamza