Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH i-g-t 14/17] lib/igt_aux: s/swap/igt_swap/
Date: Tue, 10 Feb 2015 19:05:57 +0100	[thread overview]
Message-ID: <1423591560-9471-14-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1423591560-9471-1-git-send-email-daniel.vetter@ffwll.ch>

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>
---
 lib/igt.cocci           | 4 ++--
 lib/igt_aux.h           | 2 +-
 tests/eviction_common.c | 2 +-
 tests/gem_ctx_thrash.c  | 4 ++--
 tests/gem_seqno_wrap.c  | 2 +-
 tests/gem_stress.c      | 2 +-
 tests/kms_flip.c        | 4 ++--
 7 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/igt.cocci b/lib/igt.cocci
index fd4ad2564bea..41a8beb36029 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 798a5b45fcb9..edc36a221922 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 4a12dcbc345d..b18c2a73f9c7 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 5c272338e795..b4818f4e6337 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 42493efdb20e..d07ec96064eb 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 9f20bde2f45a..f687b2d1c795 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 292b7bc60f09..09dc3c794fdf 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,
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2015-02-10 18:04 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10 18:05 [PATCH i-g-t 01/17] lib/gt: api polish for igt_can_hang_ring Daniel Vetter
2015-02-10 18:05 ` [PATCH i-g-t 02/17] lib/ioctl: api polish for gem_context_has_param Daniel Vetter
2015-02-10 18:05 ` [PATCH i-g-t 03/17] lib/ioctl: gem_ prefix for igt_require_mmap_wc Daniel Vetter
2015-02-10 21:58   ` Chris Wilson
2015-02-11  8:37     ` Daniel Vetter
2015-02-10 18:05 ` [PATCH i-g-t 04/17] igt/ioctls: doc for gem_mmap Daniel Vetter
2015-02-10 18:05 ` [PATCH i-g-t 05/17] lib/ioctls: make gem_context_set/get_param infallible Daniel Vetter
2015-02-10 21:54   ` Chris Wilson
2015-02-11  8:42     ` Daniel Vetter
2015-02-10 18:05 ` [PATCH i-g-t 06/17] lib/ioctl: Add gem_context_destroy helpers Daniel Vetter
2015-02-10 18:05 ` [PATCH i-g-t 07/17] tests/gem_ctx_*: Use helpers Daniel Vetter
2015-02-10 18:05 ` [PATCH i-g-t 08/17] tests/gem_reset_stat: Use new ctx helpers Daniel Vetter
2015-02-10 18:05 ` [PATCH i-g-t 09/17] lib/ioctl: Document ctx param functions Daniel Vetter
2015-02-10 18:05 ` [PATCH i-g-t 10/17] tests: Add gem_ctx_param_basic Daniel Vetter
2015-02-10 18:05 ` [PATCH i-g-t 11/17] tests: Add invalid pad tests for ctx create/destroy Daniel Vetter
2015-02-10 18:05 ` [PATCH i-g-t 12/17] tests/gem_ppgtt: Start rcs before bcs for context tests Daniel Vetter
2015-02-10 18:05 ` [PATCH i-g-t 13/17] tests: Align subtest with naming convention Daniel Vetter
2015-02-10 21:53   ` Chris Wilson
2015-02-11  8:44     ` Daniel Vetter
2015-02-10 18:05 ` Daniel Vetter [this message]
2015-02-10 18:05 ` [PATCH i-g-t 15/17] tests/gem_wait: Adjust makefile Daniel Vetter
2015-02-10 18:05 ` [PATCH i-g-t 16/17] doc: Consolidate naming conventions into docbook Daniel Vetter
2015-02-10 18:06 ` [PATCH i-g-t 17/17] lib/igt_gt: Document and consolidate Daniel Vetter
2015-02-10 21:36 ` [PATCH i-g-t 01/17] lib/gt: api polish for igt_can_hang_ring Chris Wilson
2015-02-10 21:56   ` Daniel Vetter
2015-02-10 21:59   ` [PATCH i-g-t] lib/chipset: Cache devid Daniel Vetter
2015-02-10 22:28     ` Chris Wilson
2015-02-10 22:37       ` Daniel Vetter
2015-02-10 22:39         ` Daniel Vetter
2015-02-10 22:45           ` Daniel Vetter
2015-02-10 22:50             ` Chris Wilson
2015-02-11  8:49               ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1423591560-9471-14-git-send-email-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox