]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915/guc: prefer __set/clear_bit() to bitmap_set/clear()
authorDave Gordon <david.s.gordon@intel.com>
Mon, 13 Jun 2016 16:57:29 +0000 (17:57 +0100)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Tue, 14 Jun 2016 14:04:07 +0000 (15:04 +0100)
Bitmap operators are overkill when touching only one bit.

Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/i915_guc_submission.c

index 65e67f0f0e91764ad87597299683be5d80cb31e7..21daaa5d8f300dc21fb0a9304125a51397bd5a83 100644 (file)
@@ -306,7 +306,7 @@ static uint16_t assign_doorbell(struct intel_guc *guc, uint32_t priority)
        if (id == end)
                id = GUC_INVALID_DOORBELL_ID;
        else
-               bitmap_set(guc->doorbell_bitmap, id, 1);
+               __set_bit(id, guc->doorbell_bitmap);
 
        DRM_DEBUG_DRIVER("assigned %s priority doorbell id 0x%x\n",
                        hi_pri ? "high" : "normal", id);
@@ -316,7 +316,7 @@ static uint16_t assign_doorbell(struct intel_guc *guc, uint32_t priority)
 
 static void release_doorbell(struct intel_guc *guc, uint16_t id)
 {
-       bitmap_clear(guc->doorbell_bitmap, id, 1);
+       __clear_bit(id, guc->doorbell_bitmap);
 }
 
 /*