[Mesa-dev] [libdrm] small fix for atomic_inc_return macro.

evgeny litvinenko evgeny.v.litvinenko at gmail.com
Thu Sep 10 16:51:00 PDT 2015


Hi.
There is a typo in macro atomic_inc_return in the file xf86atomic.h
Output of format-patch:

Date: Fri, 11 Sep 2015 01:36:31 +0300
Subject: [PATCH] Fix atomic_inc_return.

nouveau.c: In function 'nouveau_bo_wrap_locked':
nouveau.c:413: error: 'x' undeclared (first use in this function)
---
 xf86atomic.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xf86atomic.h b/xf86atomic.h
index 194554c..922b37d 100644
--- a/xf86atomic.h
+++ b/xf86atomic.h
@@ -93,7 +93,7 @@ typedef struct { LIBDRM_ATOMIC_TYPE atomic; } atomic_t;
 # define atomic_read(x) (int) ((x)->atomic)
 # define atomic_set(x, val) ((x)->atomic = (LIBDRM_ATOMIC_TYPE)(val))
 # define atomic_inc(x) (atomic_inc_uint (&(x)->atomic))
-# define atomic_inc_return (atomic_inc_uint_nv(&(x)->atomic))
+# define atomic_inc_return(x) (atomic_inc_uint_nv(&(x)->atomic))
 # define atomic_dec_and_test(x) (atomic_dec_uint_nv(&(x)->atomic) == 0)
 # define atomic_add(x, v) (atomic_add_int(&(x)->atomic, (v)))
 # define atomic_dec(x, v) (atomic_add_int(&(x)->atomic, -(v)))
-- 
2.4.2.341.g4109cf9


More information about the mesa-dev mailing list