From: Andrew Morton Date: Mon, 23 May 2011 21:48:32 +0000 (-0700) Subject: drivers/gpu/drm/radeon/atom.c: fix warning X-Git-Tag: 2.1b_release~3772^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ec8a5feaf3000bf4f9744d0caad0d5f12ce1409;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git drivers/gpu/drm/radeon/atom.c: fix warning udelay() doesn't like 8-bit arguments: drivers/gpu/drm/radeon/atom.c: In function 'atom_op_delay': drivers/gpu/drm/radeon/atom.c:653: warning: comparison is always false due to limited range of data type while we're there, use msleep() rather than open-coding it. Cc: David Airlie Reviewed-by: Alex Deucher Cc: Matt Turner Signed-off-by: Andrew Morton Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c index 7bd7456..ebdb0fd 100644 --- a/drivers/gpu/drm/radeon/atom.c +++ b/drivers/gpu/drm/radeon/atom.c @@ -652,12 +652,12 @@ 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)++); + unsigned count = U8((*ptr)++); SDEBUG(" count: %d\n", count); if (arg == ATOM_UNIT_MICROSEC) udelay(count); else - schedule_timeout_uninterruptible(msecs_to_jiffies(count)); + msleep(count); } static void atom_op_div(atom_exec_context *ctx, int *ptr, int arg)