Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm/dist/shared-core define a new macro tha...



details:   https://anonhg.NetBSD.org/src/rev/f7467841cd54
branches:  trunk
changeset: 790582:f7467841cd54
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Oct 17 21:15:00 2013 +0000

description:
define a new macro that does not declare variables used in output.

diffstat:

 sys/external/bsd/drm/dist/shared-core/mach64_drv.h   |  11 +++++++++--
 sys/external/bsd/drm/dist/shared-core/mach64_state.c |   4 ++--
 2 files changed, 11 insertions(+), 4 deletions(-)

diffs (52 lines):

diff -r b4f38487e7c6 -r f7467841cd54 sys/external/bsd/drm/dist/shared-core/mach64_drv.h
--- a/sys/external/bsd/drm/dist/shared-core/mach64_drv.h        Thu Oct 17 21:14:05 2013 +0000
+++ b/sys/external/bsd/drm/dist/shared-core/mach64_drv.h        Thu Oct 17 21:15:00 2013 +0000
@@ -697,9 +697,12 @@
  * queuing the buffer in the ring. 
  */
 
-#define DMALOCALS                              \
+#define DMALOCALS_NOOUT                                \
        drm_mach64_freelist_t *_entry = NULL;   \
-       struct drm_buf *_buf = NULL;            \
+       struct drm_buf *_buf = NULL
+
+#define        DMALOCALS                               \
+       DMALOCALS_NOOUT;                        \
        u32 *_buf_wptr; int _outcount
 
 #define GETBUFPTR( __buf )                                             \
@@ -735,8 +738,12 @@
        return 0;
 }
 
+#define DMASETPTR_NOOUT( _p )                  \
+       _buf = (_p)
+
 #define DMASETPTR( _p )                                \
 do {                                           \
+       DMASETPTR_NOOUT( _p );                  \
        _buf = (_p);                            \
        _outcount = 0;                          \
        _buf_wptr = GETBUFPTR( _buf );          \
diff -r b4f38487e7c6 -r f7467841cd54 sys/external/bsd/drm/dist/shared-core/mach64_state.c
--- a/sys/external/bsd/drm/dist/shared-core/mach64_state.c      Thu Oct 17 21:14:05 2013 +0000
+++ b/sys/external/bsd/drm/dist/shared-core/mach64_state.c      Thu Oct 17 21:15:00 2013 +0000
@@ -560,7 +560,7 @@
        int i = 0;
        int done = 0;
        int verify_ret = 0;
-       DMALOCALS;
+       DMALOCALS_NOOUT;
 
        DRM_DEBUG("buf=%p used=%lu nbox=%d\n",
                  buf, used, sarea_priv->nbox);
@@ -587,7 +587,7 @@
 
        copy_buf->used = used;
 
-       DMASETPTR(copy_buf);
+       DMASETPTR_NOOUT(copy_buf);
 
        if (sarea_priv->dirty & ~MACH64_UPLOAD_CLIPRECTS) {
                ret = mach64_emit_state(file_priv, dev_priv);



Home | Main Index | Thread Index | Old Index