Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ec8a5fe authored by Andrew Morton's avatar Andrew Morton Committed by Dave Airlie
Browse files

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 <airlied@linux.ie>
Reviewed-by: default avatarAlex Deucher <alexdeucher@gmail.com>
Cc: Matt Turner <mattst88@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent d19c37a5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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)