diff mbox

[i-g-t,2/8] lib/igt_draw: rename BIT macro to BIT_GET

Message ID 20170209021828.22813-3-michel.thierry@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michel Thierry Feb. 9, 2017, 2:18 a.m. UTC
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(-)

Comments

Joonas Lahtinen Feb. 9, 2017, 7:30 a.m. UTC | #1
On ke, 2017-02-08 at 18:18 -0800, Michel Thierry wrote:
> 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>

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
diff mbox

Patch

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: