intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Michel Thierry <michel.thierry@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t 2/8] lib/igt_draw: rename BIT macro to BIT_GET
Date: Wed,  8 Feb 2017 18:18:22 -0800	[thread overview]
Message-ID: <20170209021828.22813-3-michel.thierry@intel.com> (raw)
In-Reply-To: <20170209021828.22813-1-michel.thierry@intel.com>

Keeping macros names unique. We'll soon have a bit operations header
file and BIT is already taken.

Signed-off-by: Michel Thierry <michel.thierry@intel.com>
---
 lib/igt_draw.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/igt_draw.c b/lib/igt_draw.c
index 3afb8272..2b321715 100644
--- a/lib/igt_draw.c
+++ b/lib/igt_draw.c
@@ -96,7 +96,7 @@ const char *igt_draw_get_method_name(enum igt_draw_method method)
 	}
 }
 
-#define BIT(num, bit) ((num >> bit) & 1)
+#define BIT_GET(num, bit) ((num >> bit) & 1)
 
 static int swizzle_addr(int addr, int swizzle)
 {
@@ -104,20 +104,20 @@ static int swizzle_addr(int addr, int swizzle)
 
 	switch (swizzle) {
 	case I915_BIT_6_SWIZZLE_NONE:
-		bit6 = BIT(addr, 6);
+		bit6 = BIT_GET(addr, 6);
 		break;
 	case I915_BIT_6_SWIZZLE_9:
-		bit6 = BIT(addr, 6) ^ BIT(addr, 9);
+		bit6 = BIT_GET(addr, 6) ^ BIT_GET(addr, 9);
 		break;
 	case I915_BIT_6_SWIZZLE_9_10:
-		bit6 = BIT(addr, 6) ^ BIT(addr, 9) ^ BIT(addr, 10);
+		bit6 = BIT_GET(addr, 6) ^ BIT_GET(addr, 9) ^ BIT_GET(addr, 10);
 		break;
 	case I915_BIT_6_SWIZZLE_9_11:
-		bit6 = BIT(addr, 6) ^ BIT(addr, 9) ^ BIT(addr, 11);
+		bit6 = BIT_GET(addr, 6) ^ BIT_GET(addr, 9) ^ BIT_GET(addr, 11);
 		break;
 	case I915_BIT_6_SWIZZLE_9_10_11:
-		bit6 = BIT(addr, 6) ^ BIT(addr, 9) ^ BIT(addr, 10) ^
-		       BIT(addr, 11);
+		bit6 = BIT_GET(addr, 6) ^ BIT_GET(addr, 9) ^ BIT_GET(addr, 10) ^
+		       BIT_GET(addr, 11);
 		break;
 	case I915_BIT_6_SWIZZLE_UNKNOWN:
 	case I915_BIT_6_SWIZZLE_9_17:
-- 
2.11.0

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

  parent reply	other threads:[~2017-02-09  2:18 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09  2:18 [PATCH i-g-t 0/8] Add a bit operations library Michel Thierry
2017-02-09  2:18 ` [PATCH i-g-t 1/8] lib/igt: remove duplicate igt_core include Michel Thierry
2017-02-09  7:29   ` Joonas Lahtinen
2017-02-09  2:18 ` Michel Thierry [this message]
2017-02-09  7:30   ` [PATCH i-g-t 2/8] lib/igt_draw: rename BIT macro to BIT_GET Joonas Lahtinen
2017-02-09  2:18 ` [PATCH i-g-t 3/8] lib: Define a common bit operations library Michel Thierry
2017-02-09  7:34   ` Joonas Lahtinen
2017-02-27  9:35     ` Daniel Vetter
2017-03-01 14:19       ` Michel Thierry
2017-03-01 15:52       ` [PATCH i-g-t v2] " Michel Thierry
2017-03-01 16:14         ` Chris Wilson
2017-03-02  7:45           ` Daniel Vetter
2017-03-02 19:46             ` Michel Thierry
2017-03-07 10:54               ` Daniel Vetter
2017-03-02 19:49             ` [PATCH i-g-t v3] " Michel Thierry
2017-02-09  2:18 ` [PATCH i-g-t 4/8] lib/intel_device_info: Use igt_bitops Michel Thierry
2017-02-09  7:35   ` Joonas Lahtinen
2017-02-09  2:18 ` [PATCH i-g-t 5/8] lib/igt_draw: " Michel Thierry
2017-02-09  7:38   ` Joonas Lahtinen
2017-02-09 18:20     ` [PATCH v2 5/7] " Michel Thierry
2017-02-09 18:29     ` [PATCH i-g-t " Michel Thierry
2017-02-09  2:18 ` [PATCH i-g-t 6/8] lib/igt_gt: Define HANG_ALLOW_* as bit flags Michel Thierry
2017-02-09  2:18 ` [PATCH i-g-t 7/8] test/gem_create: import igt_bitops Michel Thierry
2017-02-09  9:57   ` Joonas Lahtinen
2017-02-09 18:25     ` Michel Thierry
2017-02-09  2:18 ` [PATCH i-g-t 8/8] tests: Use BIT macro instead of (1<<x) Michel Thierry
2017-02-09  7:50   ` Chris Wilson
2017-02-09 18:23     ` [PATCH i-g-t v2 7/7] " Michel Thierry
2017-02-15 12:56       ` Joonas Lahtinen

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=20170209021828.22813-3-michel.thierry@intel.com \
    --to=michel.thierry@intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).