OSDN Git Service

drm/amd/display: remove redundant assignment to variable v_total
authorColin Ian King <colin.king@canonical.com>
Mon, 2 Dec 2019 15:47:38 +0000 (15:47 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 2 Dec 2019 22:55:08 +0000 (17:55 -0500)
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@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/freesync/freesync.c

index 16e69bb..fa57885 100644 (file)
@@ -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 =