summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2015-02-07 12:37:48 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-02-13 09:35:36 +0100
commit2eca38eab9ccb4bc41ceda4992614ffb311ce4f7 (patch)
tree711f29c0fdf4f2168d2c3ffd5ab8d07f5da7e478
parent3e9b4e37e68da2b866e9cebf7ceb6624617e353b (diff)
lib/igt_aux: s/swap/igt_swap/
It collides with the subtest naming convention glossary entry for swap. Which makes the docbook xml stuff unhappy. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--lib/igt.cocci4
-rw-r--r--lib/igt_aux.h2
-rw-r--r--tests/eviction_common.c2
-rw-r--r--tests/gem_ctx_thrash.c4
-rw-r--r--tests/gem_seqno_wrap.c2
-rw-r--r--tests/gem_stress.c2
-rw-r--r--tests/kms_flip.c4
7 files changed, 10 insertions, 10 deletions
diff --git a/lib/igt.cocci b/lib/igt.cocci
index fd4ad256..41a8beb3 100644
--- a/lib/igt.cocci
+++ b/lib/igt.cocci
@@ -92,7 +92,7 @@ expression E;
- assert(E);
+ igt_assert(E);
-// Replace open-coded swap()
+// Replace open-coded igt_swap()
@@
type T;
T a, b, tmp;
@@ -100,7 +100,7 @@ T a, b, tmp;
- tmp = a;
- a = b;
- b = tmp;
-+ swap(a, b);
++ igt_swap(a, b);
// Replace open-coded min()
@@
diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index 798a5b45..edc36a22 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -94,7 +94,7 @@ void intel_require_memory(uint32_t count, uint32_t size, unsigned mode);
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))
-#define swap(a, b) do { \
+#define igt_swap(a, b) do { \
typeof(a) _tmp = (a); \
(a) = (b); \
(b) = _tmp; \
diff --git a/tests/eviction_common.c b/tests/eviction_common.c
index 4a12dcbc..b18c2a73 100644
--- a/tests/eviction_common.c
+++ b/tests/eviction_common.c
@@ -55,7 +55,7 @@ static void exchange_uint32_t(void *array, unsigned i, unsigned j)
{
uint32_t *i_arr = array;
- swap(i_arr[i], i_arr[j]);
+ igt_swap(i_arr[i], i_arr[j]);
}
static int minor_evictions(int fd, struct igt_eviction_test_ops *ops,
diff --git a/tests/gem_ctx_thrash.c b/tests/gem_ctx_thrash.c
index 5c272338..b4818f4e 100644
--- a/tests/gem_ctx_thrash.c
+++ b/tests/gem_ctx_thrash.c
@@ -55,13 +55,13 @@ static int ctx_per_thread;
static void xchg_ptr(void *array, unsigned i, unsigned j)
{
void **A = array;
- swap(A[i], A[j]);
+ igt_swap(A[i], A[j]);
}
static void xchg_int(void *array, unsigned i, unsigned j)
{
int *A = array;
- swap(A[i], A[j]);
+ igt_swap(A[i], A[j]);
}
static int reopen(int _fd)
diff --git a/tests/gem_seqno_wrap.c b/tests/gem_seqno_wrap.c
index 42493efd..d07ec960 100644
--- a/tests/gem_seqno_wrap.c
+++ b/tests/gem_seqno_wrap.c
@@ -172,7 +172,7 @@ static void exchange_uint(void *array, unsigned i, unsigned j)
{
unsigned *i_arr = array;
- swap(i_arr[i], i_arr[j]);
+ igt_swap(i_arr[i], i_arr[j]);
}
static void run_sync_test(int num_buffers, bool verify)
diff --git a/tests/gem_stress.c b/tests/gem_stress.c
index 9f20bde2..f687b2d1 100644
--- a/tests/gem_stress.c
+++ b/tests/gem_stress.c
@@ -571,7 +571,7 @@ static void exchange_uint(void *array, unsigned i, unsigned j)
{
unsigned *i_arr = array;
- swap(i_arr[i], i_arr[j]);
+ igt_swap(i_arr[i], i_arr[j]);
}
static void copy_tiles(unsigned *permutation)
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 292b7bc6..09dc3c79 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -242,7 +242,7 @@ static int _emit_dummy_load__bcs(struct test_output *o, int limit, int timeout)
2048, 2048,
2048*4, 2048*4);
- swap(src_bo, dst_bo);
+ igt_swap(src_bo, dst_bo);
}
blit_copy(fb_bo, src_bo,
min(o->fb_width, 2048), min(o->fb_height, 2048),
@@ -357,7 +357,7 @@ static int _emit_dummy_load__rcs(struct test_output *o, int limit, int timeout)
2048, 2048,
dst, 0, 0);
- swap(src, dst);
+ igt_swap(src, dst);
}
copyfunc(batch, NULL,
src, 0, 0,