This small patch fixes some warnings I saw when building on ia64.  I think 
it's safe to apply.  It just moves some of the RING_LOCALS macros to below 
the local stack variables to avoid "mixing code & declarations" warnings and 
adds vmalloc.h to drm_memory.h so that the vmalloc related stuff gets pulled 
in.

Thanks,
Jesse
Index: drm/linux-core/drm_memory.h
===================================================================
RCS file: /cvsroot/r300/r300_driver/drm/linux-core/drm_memory.h,v
retrieving revision 1.2
diff -u -r1.2 drm_memory.h
--- drm/linux-core/drm_memory.h 2 Mar 2005 03:54:27 -0000       1.2
+++ drm/linux-core/drm_memory.h 8 Mar 2005 18:40:03 -0000
@@ -35,6 +35,7 @@
 
 #include <linux/config.h>
 #include <linux/highmem.h>
+#include <linux/vmalloc.h>
 #include "drmP.h"
 
 /**
Index: drm/shared/r300_cmdbuf.c
===================================================================
RCS file: /cvsroot/r300/r300_driver/drm/shared-core/r300_cmdbuf.c,v
retrieving revision 1.17
diff -u -r1.17 r300_cmdbuf.c
--- drm/shared/r300_cmdbuf.c    3 Mar 2005 04:40:21 -0000       1.17
+++ drm/shared/r300_cmdbuf.c    8 Mar 2005 18:40:03 -0000
@@ -58,10 +58,10 @@
                               drm_radeon_cmd_buffer_t* cmdbuf,
                               int n)
 {
-       RING_LOCALS;
        drm_clip_rect_t box;
        int nr;
        int i;
+       RING_LOCALS;
 
        nr = cmdbuf->nbox - n;
        if (nr > R300_SIMULTANEOUS_CLIPRECTS)
@@ -242,9 +242,9 @@
                                                drm_radeon_cmd_buffer_t* cmdbuf,
                                                drm_r300_cmd_header_t header)
 {
-       RING_LOCALS;
        int reg;
        int sz;
+       RING_LOCALS;
 
        sz = header.unchecked_state.count;
        reg = (header.unchecked_state.reghi << 8) | 
header.unchecked_state.reglo;
@@ -281,9 +281,9 @@
                                    drm_radeon_cmd_buffer_t* cmdbuf,
                                    drm_r300_cmd_header_t header)
 {
-       RING_LOCALS;
        int sz;
        int addr;
+       RING_LOCALS;
 
        sz = header.vpu.count;
        addr = (header.vpu.adrhi << 8) | header.vpu.adrlo;
@@ -344,9 +344,9 @@
 static __inline__ int r300_emit_raw(drm_radeon_private_t* dev_priv,
                                      drm_radeon_cmd_buffer_t* cmdbuf)
 {
-       RING_LOCALS;
        unsigned int u;
        int count;
+       RING_LOCALS;
 
        if (4 > cmdbuf->bufsz)
                return DRM_ERR(EINVAL);
Index: drm/shared-core/r300_cmdbuf.c
===================================================================
RCS file: /cvsroot/r300/r300_driver/drm/shared-core/r300_cmdbuf.c,v
retrieving revision 1.17
diff -u -r1.17 r300_cmdbuf.c
--- drm/shared-core/r300_cmdbuf.c       3 Mar 2005 04:40:21 -0000       1.17
+++ drm/shared-core/r300_cmdbuf.c       8 Mar 2005 18:40:03 -0000
@@ -58,10 +58,10 @@
                               drm_radeon_cmd_buffer_t* cmdbuf,
                               int n)
 {
-       RING_LOCALS;
        drm_clip_rect_t box;
        int nr;
        int i;
+       RING_LOCALS;
 
        nr = cmdbuf->nbox - n;
        if (nr > R300_SIMULTANEOUS_CLIPRECTS)
@@ -242,9 +242,9 @@
                                                drm_radeon_cmd_buffer_t* cmdbuf,
                                                drm_r300_cmd_header_t header)
 {
-       RING_LOCALS;
        int reg;
        int sz;
+       RING_LOCALS;
 
        sz = header.unchecked_state.count;
        reg = (header.unchecked_state.reghi << 8) | 
header.unchecked_state.reglo;
@@ -281,9 +281,9 @@
                                    drm_radeon_cmd_buffer_t* cmdbuf,
                                    drm_r300_cmd_header_t header)
 {
-       RING_LOCALS;
        int sz;
        int addr;
+       RING_LOCALS;
 
        sz = header.vpu.count;
        addr = (header.vpu.adrhi << 8) | header.vpu.adrlo;
@@ -344,9 +344,9 @@
 static __inline__ int r300_emit_raw(drm_radeon_private_t* dev_priv,
                                      drm_radeon_cmd_buffer_t* cmdbuf)
 {
-       RING_LOCALS;
        unsigned int u;
        int count;
+       RING_LOCALS;
 
        if (4 > cmdbuf->bufsz)
                return DRM_ERR(EINVAL);

Reply via email to