]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/gvt: Use BIT() to make klockwork happy
authorZhi Wang <zhi.a.wang@intel.com>
Tue, 26 Sep 2017 07:02:21 +0000 (15:02 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Thu, 16 Nov 2017 03:48:20 +0000 (11:48 +0800)
Replace the plain bit usage with BIT() to make klockwork happy.

Cc: Deng Hongyi <hongyi.deng@intel.com>
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
drivers/gpu/drm/i915/gvt/gtt.c

index 2801d70579d8cd3839ae904386127d4007efd3de..77da3ecfc4cc66df81fc7759867cee93a7e70603 100644 (file)
@@ -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);
 }
 
 /*