drm/radeon: Fix printf type warning in 64bit system.
authorPauli Nieminen <suokkos@gmail.com>
Mon, 1 Mar 2010 09:37:11 +0000 (11:37 +0200)
committerDave Airlie <airlied@ppcg5.localdomain>
Mon, 1 Mar 2010 11:21:37 +0000 (22:21 +1100)
Type of iterator was promoted to unsigned long in 64bit systems.

*header is small structure so it is alwas safe to cast return value
of sizeof operator to int.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
drivers/gpu/drm/radeon/r300_cmdbuf.c

index 7f59352cd637d5914d2dfe474a23d901e7d310a1..ea46d558e8f394040cd9d7b3503c8c3c2e1be5da 100644 (file)
@@ -767,7 +767,7 @@ static __inline__ int r300_emit_packet3(drm_radeon_private_t *dev_priv,
                default:
                        DRM_ERROR("bad packet3 type %i at byte %d\n",
                                  header.packet3.packet,
-                                 cmdbuf->buffer->iterator - sizeof(header));
+                                 cmdbuf->buffer->iterator - (int)sizeof(header));
                        return -EINVAL;
                }
 
@@ -1153,7 +1153,7 @@ int r300_do_cp_cmdbuf(struct drm_device *dev,
                default:
                        DRM_ERROR("bad cmd_type %i at byte %d\n",
                                  header->header.cmd_type,
-                                 cmdbuf->buffer->iterator - sizeof(*header));
+                                 cmdbuf->buffer->iterator - (int)sizeof(*header));
                        ret = -EINVAL;
                        goto cleanup;
                }