[patch 1/1] drivers/gpu/drm/radeon/atom.c: fix warning

akpm at linux-foundation.org akpm at linux-foundation.org
Wed Oct 20 15:56:37 PDT 2010


From: Andrew Morton <akpm at linux-foundation.org>

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

Cc: David Airlie <airlied at linux.ie>
Cc: Alex Deucher <alexdeucher at gmail.com>
Cc: Matt Turner <mattst88 at gmail.com>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
---

 drivers/gpu/drm/radeon/atom.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/gpu/drm/radeon/atom.c~drivers-gpu-drm-radeon-atomc-fix-warning drivers/gpu/drm/radeon/atom.c
--- a/drivers/gpu/drm/radeon/atom.c~drivers-gpu-drm-radeon-atomc-fix-warning
+++ a/drivers/gpu/drm/radeon/atom.c
@@ -647,7 +647,7 @@ static void atom_op_compare(atom_exec_co
 
 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);
_


More information about the dri-devel mailing list