qed: Fix setting/clearing bit in completion bitmap
[firefly-linux-kernel-4.4.55.git] / drivers / net / ethernet / qlogic / qed / qed_spq.c
index 3dd548ab8df14aabf9fa6a551cf54aa97f704d12..40365cb1abe6c33f7d90661c639333d24b569c27 100644 (file)
@@ -794,13 +794,12 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn,
                         * in a bitmap and increasing the chain consumer only
                         * for the first successive completed entries.
                         */
-                       bitmap_set(p_spq->p_comp_bitmap, pos, SPQ_RING_SIZE);
+                       __set_bit(pos, p_spq->p_comp_bitmap);
 
                        while (test_bit(p_spq->comp_bitmap_idx,
                                        p_spq->p_comp_bitmap)) {
-                               bitmap_clear(p_spq->p_comp_bitmap,
-                                            p_spq->comp_bitmap_idx,
-                                            SPQ_RING_SIZE);
+                               __clear_bit(p_spq->comp_bitmap_idx,
+                                           p_spq->p_comp_bitmap);
                                p_spq->comp_bitmap_idx++;
                                qed_chain_return_produced(&p_spq->chain);
                        }