diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2005-09-30 04:37:36 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-09-30 04:37:36 -0400 |
commit | b3a83639895a422b25f72eec0a5d1d88c3ac4e9e (patch) | |
tree | 1cd03d53cccb01964ea57564d7be575a29b7fec2 /drivers/char/drm/radeon_state.c | |
parent | 689b9d74b1c00e1316fbb7d1e912fe1227fdb1ab (diff) |
drm: fix all sparse warning on 32-bit x86
Finally cleaned up the sparse warnings for the drm.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/radeon_state.c')
-rw-r--r-- | drivers/char/drm/radeon_state.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/char/drm/radeon_state.c b/drivers/char/drm/radeon_state.c index 2eae60bd340f..231ac1438c69 100644 --- a/drivers/char/drm/radeon_state.c +++ b/drivers/char/drm/radeon_state.c | |||
@@ -40,7 +40,7 @@ | |||
40 | static __inline__ int radeon_check_and_fixup_offset(drm_radeon_private_t * | 40 | static __inline__ int radeon_check_and_fixup_offset(drm_radeon_private_t * |
41 | dev_priv, | 41 | dev_priv, |
42 | drm_file_t * filp_priv, | 42 | drm_file_t * filp_priv, |
43 | u32 * offset) | 43 | u32 *offset) |
44 | { | 44 | { |
45 | u32 off = *offset; | 45 | u32 off = *offset; |
46 | struct drm_radeon_driver_file_fields *radeon_priv; | 46 | struct drm_radeon_driver_file_fields *radeon_priv; |
@@ -66,7 +66,7 @@ static __inline__ int radeon_check_and_fixup_offset(drm_radeon_private_t * | |||
66 | static __inline__ int radeon_check_and_fixup_packets(drm_radeon_private_t * | 66 | static __inline__ int radeon_check_and_fixup_packets(drm_radeon_private_t * |
67 | dev_priv, | 67 | dev_priv, |
68 | drm_file_t * filp_priv, | 68 | drm_file_t * filp_priv, |
69 | int id, u32 __user * data) | 69 | int id, u32 *data) |
70 | { | 70 | { |
71 | switch (id) { | 71 | switch (id) { |
72 | 72 | ||
@@ -240,8 +240,7 @@ static __inline__ int radeon_check_and_fixup_packets(drm_radeon_private_t * | |||
240 | static __inline__ int radeon_check_and_fixup_packet3(drm_radeon_private_t * | 240 | static __inline__ int radeon_check_and_fixup_packet3(drm_radeon_private_t * |
241 | dev_priv, | 241 | dev_priv, |
242 | drm_file_t * filp_priv, | 242 | drm_file_t * filp_priv, |
243 | drm_radeon_cmd_buffer_t * | 243 | drm_radeon_kcmd_buffer_t *cmdbuf, |
244 | cmdbuf, | ||
245 | unsigned int *cmdsz) | 244 | unsigned int *cmdsz) |
246 | { | 245 | { |
247 | u32 *cmd = (u32 *) cmdbuf->buf; | 246 | u32 *cmd = (u32 *) cmdbuf->buf; |
@@ -2564,7 +2563,7 @@ static int radeon_cp_vertex2(DRM_IOCTL_ARGS) | |||
2564 | static int radeon_emit_packets(drm_radeon_private_t * dev_priv, | 2563 | static int radeon_emit_packets(drm_radeon_private_t * dev_priv, |
2565 | drm_file_t * filp_priv, | 2564 | drm_file_t * filp_priv, |
2566 | drm_radeon_cmd_header_t header, | 2565 | drm_radeon_cmd_header_t header, |
2567 | drm_radeon_cmd_buffer_t * cmdbuf) | 2566 | drm_radeon_kcmd_buffer_t *cmdbuf) |
2568 | { | 2567 | { |
2569 | int id = (int)header.packet.packet_id; | 2568 | int id = (int)header.packet.packet_id; |
2570 | int sz, reg; | 2569 | int sz, reg; |
@@ -2599,7 +2598,7 @@ static int radeon_emit_packets(drm_radeon_private_t * dev_priv, | |||
2599 | 2598 | ||
2600 | static __inline__ int radeon_emit_scalars(drm_radeon_private_t * dev_priv, | 2599 | static __inline__ int radeon_emit_scalars(drm_radeon_private_t * dev_priv, |
2601 | drm_radeon_cmd_header_t header, | 2600 | drm_radeon_cmd_header_t header, |
2602 | drm_radeon_cmd_buffer_t * cmdbuf) | 2601 | drm_radeon_kcmd_buffer_t * cmdbuf) |
2603 | { | 2602 | { |
2604 | int sz = header.scalars.count; | 2603 | int sz = header.scalars.count; |
2605 | int start = header.scalars.offset; | 2604 | int start = header.scalars.offset; |
@@ -2621,7 +2620,7 @@ static __inline__ int radeon_emit_scalars(drm_radeon_private_t * dev_priv, | |||
2621 | */ | 2620 | */ |
2622 | static __inline__ int radeon_emit_scalars2(drm_radeon_private_t * dev_priv, | 2621 | static __inline__ int radeon_emit_scalars2(drm_radeon_private_t * dev_priv, |
2623 | drm_radeon_cmd_header_t header, | 2622 | drm_radeon_cmd_header_t header, |
2624 | drm_radeon_cmd_buffer_t * cmdbuf) | 2623 | drm_radeon_kcmd_buffer_t * cmdbuf) |
2625 | { | 2624 | { |
2626 | int sz = header.scalars.count; | 2625 | int sz = header.scalars.count; |
2627 | int start = ((unsigned int)header.scalars.offset) + 0x100; | 2626 | int start = ((unsigned int)header.scalars.offset) + 0x100; |
@@ -2641,7 +2640,7 @@ static __inline__ int radeon_emit_scalars2(drm_radeon_private_t * dev_priv, | |||
2641 | 2640 | ||
2642 | static __inline__ int radeon_emit_vectors(drm_radeon_private_t * dev_priv, | 2641 | static __inline__ int radeon_emit_vectors(drm_radeon_private_t * dev_priv, |
2643 | drm_radeon_cmd_header_t header, | 2642 | drm_radeon_cmd_header_t header, |
2644 | drm_radeon_cmd_buffer_t * cmdbuf) | 2643 | drm_radeon_kcmd_buffer_t * cmdbuf) |
2645 | { | 2644 | { |
2646 | int sz = header.vectors.count; | 2645 | int sz = header.vectors.count; |
2647 | int start = header.vectors.offset; | 2646 | int start = header.vectors.offset; |
@@ -2662,7 +2661,7 @@ static __inline__ int radeon_emit_vectors(drm_radeon_private_t * dev_priv, | |||
2662 | 2661 | ||
2663 | static int radeon_emit_packet3(drm_device_t * dev, | 2662 | static int radeon_emit_packet3(drm_device_t * dev, |
2664 | drm_file_t * filp_priv, | 2663 | drm_file_t * filp_priv, |
2665 | drm_radeon_cmd_buffer_t * cmdbuf) | 2664 | drm_radeon_kcmd_buffer_t *cmdbuf) |
2666 | { | 2665 | { |
2667 | drm_radeon_private_t *dev_priv = dev->dev_private; | 2666 | drm_radeon_private_t *dev_priv = dev->dev_private; |
2668 | unsigned int cmdsz; | 2667 | unsigned int cmdsz; |
@@ -2688,7 +2687,7 @@ static int radeon_emit_packet3(drm_device_t * dev, | |||
2688 | 2687 | ||
2689 | static int radeon_emit_packet3_cliprect(drm_device_t * dev, | 2688 | static int radeon_emit_packet3_cliprect(drm_device_t * dev, |
2690 | drm_file_t * filp_priv, | 2689 | drm_file_t * filp_priv, |
2691 | drm_radeon_cmd_buffer_t * cmdbuf, | 2690 | drm_radeon_kcmd_buffer_t *cmdbuf, |
2692 | int orig_nbox) | 2691 | int orig_nbox) |
2693 | { | 2692 | { |
2694 | drm_radeon_private_t *dev_priv = dev->dev_private; | 2693 | drm_radeon_private_t *dev_priv = dev->dev_private; |
@@ -2785,7 +2784,7 @@ static int radeon_cp_cmdbuf(DRM_IOCTL_ARGS) | |||
2785 | drm_device_dma_t *dma = dev->dma; | 2784 | drm_device_dma_t *dma = dev->dma; |
2786 | drm_buf_t *buf = NULL; | 2785 | drm_buf_t *buf = NULL; |
2787 | int idx; | 2786 | int idx; |
2788 | drm_radeon_cmd_buffer_t cmdbuf; | 2787 | drm_radeon_kcmd_buffer_t cmdbuf; |
2789 | drm_radeon_cmd_header_t header; | 2788 | drm_radeon_cmd_header_t header; |
2790 | int orig_nbox, orig_bufsz; | 2789 | int orig_nbox, orig_bufsz; |
2791 | char *kbuf = NULL; | 2790 | char *kbuf = NULL; |
@@ -2819,7 +2818,7 @@ static int radeon_cp_cmdbuf(DRM_IOCTL_ARGS) | |||
2819 | kbuf = drm_alloc(cmdbuf.bufsz, DRM_MEM_DRIVER); | 2818 | kbuf = drm_alloc(cmdbuf.bufsz, DRM_MEM_DRIVER); |
2820 | if (kbuf == NULL) | 2819 | if (kbuf == NULL) |
2821 | return DRM_ERR(ENOMEM); | 2820 | return DRM_ERR(ENOMEM); |
2822 | if (DRM_COPY_FROM_USER(kbuf, cmdbuf.buf, cmdbuf.bufsz)) { | 2821 | if (DRM_COPY_FROM_USER(kbuf, (void __user *)cmdbuf.buf, cmdbuf.bufsz)) { |
2823 | drm_free(kbuf, orig_bufsz, DRM_MEM_DRIVER); | 2822 | drm_free(kbuf, orig_bufsz, DRM_MEM_DRIVER); |
2824 | return DRM_ERR(EFAULT); | 2823 | return DRM_ERR(EFAULT); |
2825 | } | 2824 | } |