diff mbox

[i-g-t,6/8] lib/igt_gt: Define HANG_ALLOW_* as bit flags

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

Commit Message

Michel Thierry Feb. 9, 2017, 2:18 a.m. UTC
As that is what they are meant to be. It will prevent any confusion when we
have to add other flags in the future.

v2: use BIT (Joonas).

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Michel Thierry <michel.thierry@intel.com>
---
 lib/igt_gt.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/lib/igt_gt.h b/lib/igt_gt.h
index e44b6db1..c47d0c12 100644
--- a/lib/igt_gt.h
+++ b/lib/igt_gt.h
@@ -24,6 +24,7 @@ 
 #ifndef IGT_GT_H
 #define IGT_GT_H
 
+#include "igt_bitops.h"
 #include "igt_debugfs.h"
 
 void igt_require_hang_ring(int fd, int ring);
@@ -45,8 +46,8 @@  igt_hang_t igt_hang_ctx(int fd,
 			int ring,
 			unsigned flags,
 			uint64_t *offset);
-#define HANG_ALLOW_BAN 1
-#define HANG_ALLOW_CAPTURE 2
+#define HANG_ALLOW_BAN		BIT(0)
+#define HANG_ALLOW_CAPTURE	BIT(1)
 
 igt_hang_t igt_hang_ring(int fd, int ring);
 void igt_post_hang_ring(int fd, igt_hang_t arg);