[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CADnq5_PeZBRLVYosQ+rmhDa2QdJv3_FEJJ8Xf6sjoJH5rw8zKA@mail.gmail.com>
Date: Fri, 15 Jun 2018 12:39:08 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Cc: Signed-off-by@...edesktop.org:Roman Li <Roman.Li@....com>, Alex Deucher <alexander.deucher@....com>, Christian König <christian.koenig@....com>, David (ChunMing) Zhou <David1.Zhou@....com>, David Airlie <airlied@...ux.ie>,
Maling list - DRI developers
<dri-devel@...ts.freedesktop.org>,
amd-gfx list <amd-gfx@...ts.freedesktop.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/amd/display: fix type of variable
On Fri, Jun 15, 2018 at 9:32 AM, Gustavo A. R. Silva
<gustavo@...eddedor.com> wrote:
> 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@...eddedor.com>
Applied. thanks!
Alex
> ---
> drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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 e2994d3..111c492 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;
>
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Powered by blists - more mailing lists