summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Gordon <david.s.gordon@intel.com>2014-07-15 17:35:07 +0100
committerJohn Harrison <John.C.Harrison@Intel.com>2016-04-14 17:59:13 +0100
commitae502bb54af9bc1b5062a0e21920ce920eaea21f (patch)
tree0e607e6b0d58b591ad8dfbdda3564e32575ee7e8
parent7bd4f918c46135762e14c359a5b3c6340364082c (diff)
intel-gpu-tools: fix parenthesisation in #defines
This fixes some compiler warnings. In particular, the definition of MI_NOOP_ID_MASK was *incorrect* due to lack of required parentheses. Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
-rw-r--r--lib/i830_reg.h4
-rw-r--r--lib/intel_reg.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/i830_reg.h b/lib/i830_reg.h
index a57691c7eb37..63dac8c89da7 100644
--- a/lib/i830_reg.h
+++ b/lib/i830_reg.h
@@ -43,7 +43,7 @@
/* broadwater flush bits */
#define BRW_MI_GLOBAL_SNAPSHOT_RESET (1 << 3)
-#define MI_COND_BATCH_BUFFER_END (0x36<<23 | 1)
+#define MI_COND_BATCH_BUFFER_END ((0x36<<23) | 1)
#define MI_DO_COMPARE (1<<21)
#define MI_BATCH_BUFFER_END (0xA << 23)
@@ -51,7 +51,7 @@
/* Noop */
#define MI_NOOP 0x00
#define MI_NOOP_WRITE_ID (1<<22)
-#define MI_NOOP_ID_MASK (1<<22 - 1)
+#define MI_NOOP_ID_MASK ((1<<22) - 1)
/* Wait for Events */
#define MI_WAIT_FOR_EVENT (0x03<<23)
diff --git a/lib/intel_reg.h b/lib/intel_reg.h
index 0ffa803dab8d..356251a06528 100644
--- a/lib/intel_reg.h
+++ b/lib/intel_reg.h
@@ -2581,7 +2581,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* Noop */
#define MI_NOOP 0x00
#define MI_NOOP_WRITE_ID (1<<22)
-#define MI_NOOP_ID_MASK (1<<22 - 1)
+#define MI_NOOP_ID_MASK ((1<<22) - 1)
#define STATE3D_COLOR_FACTOR ((0x3<<29)|(0x1d<<24)|(0x01<<16))