[Intel-gfx] [PATCH 3/3] drm/i915: Use BIT() for computing the engine's flag

Chris Wilson chris at chris-wilson.co.uk
Fri Mar 24 16:35:40 UTC 2017


Since the engine's flag is just the bit of its id, use BIT().

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
---
 drivers/gpu/drm/i915/intel_ringbuffer.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
index 93be3bd99a38..3aae2c4f9ca3 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -432,10 +432,9 @@ struct intel_engine_cs {
 	u32 (*get_cmd_length_mask)(u32 cmd_header);
 };
 
-static inline unsigned
-intel_engine_flag(const struct intel_engine_cs *engine)
+static inline unsigned intel_engine_flag(const struct intel_engine_cs *engine)
 {
-	return 1 << engine->id;
+	return BIT(engine->id);
 }
 
 static inline u32
-- 
2.11.0



More information about the Intel-gfx mailing list