[PATCH] drm/amd/display: remove redundant assignment to variable v_total
Alex Deucher
alexdeucher at gmail.com
Mon Dec 2 21:38:56 UTC 2019
Applied. thanks!
Alex
On Mon, Dec 2, 2019 at 10:47 AM Colin King <colin.king at canonical.com> wrote:
>
> From: Colin Ian King <colin.king at canonical.com>
>
> The variable v_total is being initialized with a value that is never
> read and it is being updated later with a new value. The initialization
> is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
> index 16e69bbc69aa..fa57885503d4 100644
> --- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
> +++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
> @@ -122,7 +122,7 @@ static unsigned int calc_v_total_from_refresh(
> const struct dc_stream_state *stream,
> unsigned int refresh_in_uhz)
> {
> - unsigned int v_total = stream->timing.v_total;
> + unsigned int v_total;
> unsigned int frame_duration_in_ns;
>
> frame_duration_in_ns =
> --
> 2.24.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
More information about the amd-gfx
mailing list