diff mbox series

[libdrm,2/2] xf86atomic: #undef internal define

Message ID 20181107180113.26583-2-eric.engestrom@intel.com (mailing list archive)
State New, archived
Headers show
Series [libdrm,1/2] freedreno: remove always-defined #ifdef | expand

Commit Message

Eric Engestrom Nov. 7, 2018, 6:01 p.m. UTC
Thanks to the #error just above, any file including this header can only
see one state for this macro: defined, with the value `1`.
Let's just #undef it once we're done using it in here so that other
files don't misconstrue any meaning to it.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
---
 xf86atomic.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Emil Velikov Dec. 17, 2018, 5:57 p.m. UTC | #1
On Wed, 7 Nov 2018 at 18:01, Eric Engestrom <eric.engestrom@intel.com> wrote:
>
> Thanks to the #error just above, any file including this header can only
> see one state for this macro: defined, with the value `1`.
> Let's just #undef it once we're done using it in here so that other
> files don't misconstrue any meaning to it.
>
> Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>

For the series:
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

-Emil
diff mbox series

Patch

diff --git a/xf86atomic.h b/xf86atomic.h
index 2d733bd53eea3868259c..e268d274f75b0d7e66f2 100644
--- a/xf86atomic.h
+++ b/xf86atomic.h
@@ -101,6 +101,8 @@  typedef struct { LIBDRM_ATOMIC_TYPE atomic; } atomic_t;
 #error libdrm requires atomic operations, please define them for your CPU/compiler.
 #endif
 
+#undef HAS_ATOMIC_OPS
+
 static inline int atomic_add_unless(atomic_t *v, int add, int unless)
 {
 	int c, old;