diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2018-06-15 16:32:28 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-06-15 19:47:15 +0300 |
commit | fe78627d430435d22316fe39f2012ece31bf23c2 (patch) | |
tree | c06c8144b917c531fbf12dc488c78c4f5e7493a0 | |
parent | 5c2199270275581a06571960e7d6abac008ff060 (diff) | |
download | linux-fe78627d430435d22316fe39f2012ece31bf23c2.tar.xz |
drm/amd/display: fix type of variable
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>
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c index e2994d337044..111c4921987f 100644 --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c @@ -143,7 +143,7 @@ static void wait_for_fbc_state_changed( struct dce110_compressor *cp110, bool enabled) { - uint8_t counter = 0; + uint16_t counter = 0; uint32_t addr = mmFBC_STATUS; uint32_t value; |