Skip to content

Commit

Permalink
drm: fix radeon warnings on 64-bit
Browse files Browse the repository at this point in the history
From: Andrew Morton <akpm@osdl.org>

drivers/char/drm/radeon_state.c: In function `radeon_cp_dispatch_texture':
drivers/char/drm/radeon_state.c:1653: warning: int format, different type arg
(arg 3)
drivers/char/drm/radeon_state.c:1661: warning: int format, different type arg
(arg 3)
drivers/char/drm/radeon_state.c:1689: warning: int format, different type arg
(arg 3)

sizeof() doesn't return an int.

Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
  • Loading branch information
Dave Airlie authored and Dave Airlie committed Jan 10, 2006
1 parent 2185200 commit f8e0f29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/char/drm/radeon_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1651,15 +1651,15 @@ static int radeon_cp_dispatch_texture(DRMFILE filp,
if (tex->height == 1) {
if (tex_width >= 64 || tex_width <= 16) {
RADEON_COPY_MT(buffer, data,
tex_width * sizeof(u32));
(int)(tex_width * sizeof(u32)));
} else if (tex_width == 32) {
RADEON_COPY_MT(buffer, data, 16);
RADEON_COPY_MT(buffer + 8,
data + 16, 16);
}
} else if (tex_width >= 64 || tex_width == 16) {
RADEON_COPY_MT(buffer, data,
dwords * sizeof(u32));
(int)(dwords * sizeof(u32)));
} else if (tex_width < 16) {
for (i = 0; i < tex->height; i++) {
RADEON_COPY_MT(buffer, data, tex_width);
Expand Down Expand Up @@ -1687,7 +1687,7 @@ static int radeon_cp_dispatch_texture(DRMFILE filp,
* can upload it directly.
*/
RADEON_COPY_MT(buffer, data,
dwords * sizeof(u32));
(int)(dwords * sizeof(u32)));
} else {
/* Texture image width is less than the minimum, so we
* need to pad out each image scanline to the minimum
Expand Down

0 comments on commit f8e0f29

Please sign in to comment.