History

swiotlb: use wrap_area_index() instead of open-coding it

No functional change, just use an existing helper.

Petr Tesarik committed 3 years ago

Commit 39e7d2a1 parent 7c3940b1 file · +1 −4Browse files

Unified · Split

kernel/dma/swiotlb.c+1−4
@@ -695,10 +695,7 @@ found: · 694 unmodified lines
695695 /*
696696 * Update the indices to avoid searching in the next round.
697697 */
698− if (index + nslots < mem->area_nslabs)
699− area->index = index + nslots;
700− else
701− area->index = 0;
698+ area->index = wrap_area_index(mem, index + nslots);
702699 area->used += nslots;
703700 spin_unlock_irqrestore(&area->lock, flags);
704701 return slot_index;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t