]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
drm/amd/display: fix type of variable
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Fri, 15 Jun 2018 13:32:28 +0000 (08:32 -0500)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:47:12 +0000 (19:47 -0600)
commitb26ab3c7743cae2d130314a18d27afe043b2cfbb
tree72762aa7f0e0530744792c4fe335b1e39c09406e
parentdb355835f2a9c59a6eff3e2748498974e156f445
drm/amd/display: fix type of variable

BugLink: https://bugs.launchpad.net/bugs/1835972
commit fe78627d430435d22316fe39f2012ece31bf23c2 upstream.

Currently, the maximum value that *counter* can reach is 255, and
code at line 150: while (counter < 1000) { implies a bigger value
could be expected.

Fix this by changing the type of variable *counter* from uint8_t
to uint16_t.

Addresses-Coverity-ID: 1470030 ("Operands don't affect result")
Fixes: 2b6199a1d1b7 ("drm/amd/display: replace msleep with udelay in fbc path")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c