Re: [PATCH -next] drm/amd/display: remove set but not used variable 'core_freesync'
From: Alex Deucher
Date: Mon Oct 07 2019 - 11:57:42 EST
On Mon, Oct 7, 2019 at 10:06 AM Harry Wentland <hwentlan@xxxxxxx> wrote:
>
> On 2019-10-06 6:57 a.m., YueHaibing wrote:
> > Fixes gcc '-Wunused-but-set-variable' warning:
> >
> > rivers/gpu/drm/amd/amdgpu/../display/modules/freesync/freesync.c:
> > In function mod_freesync_get_settings:
> > drivers/gpu/drm/amd/amdgpu/../display/modules/freesync/freesync.c:984:24:
> > warning: variable core_freesync set but not used [-Wunused-but-set-variable]
> >
> > It is not used since commit 98e6436d3af5 ("drm/amd/display: Refactor FreeSync module")
> >
> > Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
> > Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>
>
> Reviewed-by: Harry Wentland <harry.wentland@xxxxxxx>
>
Applied. Thanks!
Alex
> Harry
>
> > ---
> > drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 4 ----
> > 1 file changed, 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
> > index 9ce56a8..237dda7 100644
> > --- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
> > +++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
> > @@ -981,13 +981,9 @@ void mod_freesync_get_settings(struct mod_freesync *mod_freesync,
> > unsigned int *inserted_frames,
> > unsigned int *inserted_duration_in_us)
> > {
> > - struct core_freesync *core_freesync = NULL;
> > -
> > if (mod_freesync == NULL)
> > return;
> >
> > - core_freesync = MOD_FREESYNC_TO_CORE(mod_freesync);
> > -
> > if (vrr->supported) {
> > *v_total_min = vrr->adjust.v_total_min;
> > *v_total_max = vrr->adjust.v_total_max;
> >
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx