@@ -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:
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(-)