[PATCH] drm/i915/gvt: Use BIT() to make klockwork happy
Wang, Zhi A
zhi.a.wang at intel.com
Thu Sep 28 08:35:45 UTC 2017
If no one has further comments, this patch will be merged.
Thanks,
Zhi.
-----Original Message-----
From: Wang, Zhi A
Sent: Tuesday, September 26, 2017 10:06 AM
To: intel-gvt-dev at lists.freedesktop.org
Cc: Wang, Zhi A <zhi.a.wang at intel.com>; Deng, Hongyi <hongyi.deng at intel.com>
Subject: [PATCH] drm/i915/gvt: Use BIT() to make klockwork happy
Replace the plain bit usage with BIT() to make klockwork happy.
Cc: Deng Hongyi <hongyi.deng at intel.com>
Signed-off-by: Zhi Wang <zhi.a.wang at intel.com>
---
drivers/gpu/drm/i915/gvt/gtt.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c index 2ba15de..fba23df 100644
--- a/drivers/gpu/drm/i915/gvt/gtt.c
+++ b/drivers/gpu/drm/i915/gvt/gtt.c
@@ -351,7 +351,7 @@ static bool gen8_gtt_test_pse(struct intel_gvt_gtt_entry *e)
return false;
e->type = get_entry_type(e->type);
- if (!(e->val64 & (1 << 7)))
+ if (!(e->val64 & BIT(7)))
return false;
e->type = get_pse_type(e->type);
@@ -369,12 +369,12 @@ static bool gen8_gtt_test_present(struct intel_gvt_gtt_entry *e)
|| e->type == GTT_TYPE_PPGTT_ROOT_L4_ENTRY)
return (e->val64 != 0);
else
- return (e->val64 & (1 << 0));
+ return (e->val64 & BIT(0));
}
static void gtt_entry_clear_present(struct intel_gvt_gtt_entry *e) {
- e->val64 &= ~(1 << 0);
+ e->val64 &= ~BIT(0);
}
/*
--
2.7.4
More information about the intel-gvt-dev
mailing list