Message ID | 1465577461-35616-4-git-send-email-david.s.gordon@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 10/06/16 17:50, Dave Gordon wrote: > Bitmap operators are overkill when touching only one bit. > > Signed-off-by: Dave Gordon <david.s.gordon@intel.com> > --- > drivers/gpu/drm/i915/i915_guc_submission.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c > index 7510841..e198599 100644 > --- a/drivers/gpu/drm/i915/i915_guc_submission.c > +++ b/drivers/gpu/drm/i915/i915_guc_submission.c > @@ -251,7 +251,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); > @@ -261,7 +261,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); > } > > /* > Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Regards, Tvrtko
diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c index 7510841..e198599 100644 --- a/drivers/gpu/drm/i915/i915_guc_submission.c +++ b/drivers/gpu/drm/i915/i915_guc_submission.c @@ -251,7 +251,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); @@ -261,7 +261,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); } /*
Bitmap operators are overkill when touching only one bit. Signed-off-by: Dave Gordon <david.s.gordon@intel.com> --- drivers/gpu/drm/i915/i915_guc_submission.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)