[<prev] [next>] [day] [month] [year] [list]
Message-ID: <AANLkTiniutXFx3rtdSx+ZcicGDO_NXqUPv=63kPV-BNU@mail.gmail.com>
Date: Sat, 2 Apr 2011 09:51:17 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: "'Liu Yuan" <namei.unix@...il.com>, '@...edesktop.org
Cc: David Airlie <airlied@...ux.ie>, Liu Yuan <tailai.ly@...bao.com>,
open list <linux-kernel@...r.kernel.org>,
"open list:DRM DRIVERS" <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH] drm/radeon: Fix an always-false-comparison
On Fri, Apr 1, 2011 at 1:12 AM, 'Liu Yuan <namei.unix@...il.com> wrote:
> From: Liu Yuan <tailai.ly@...bao.com>
>
> In the function atom_op_delay() of drivers/gpu/drm/radeon/atom.c,
> the comparison performed in the udelay() is always false due to
> that the unsigned-char is compared to an integer 20000.
>
nack. the delay count is only an 8 bit field.
Alex
> Signed-off-by: Liu Yuan <tailai.ly@...bao.com>
> ---
> drivers/gpu/drm/radeon/atom.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c
> index 258fa5e..e248211 100644
> --- a/drivers/gpu/drm/radeon/atom.c
> +++ b/drivers/gpu/drm/radeon/atom.c
> @@ -648,7 +648,7 @@ static void atom_op_compare(atom_exec_context *ctx, int *ptr, int arg)
>
> static void atom_op_delay(atom_exec_context *ctx, int *ptr, int arg)
> {
> - uint8_t count = U8((*ptr)++);
> + uint32_t count = U32((*ptr)++);
> SDEBUG(" count: %d\n", count);
> if (arg == ATOM_UNIT_MICROSEC)
> udelay(count);
> --
> 1.7.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists