projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c3940b
)
swiotlb: use wrap_area_index() instead of open-coding it
author
Petr Tesarik
<petr.tesarik.ext@huawei.com>
Tue, 21 Mar 2023 08:31:26 +0000
(09:31 +0100)
committer
Christoph Hellwig
<hch@lst.de>
Wed, 22 Mar 2023 08:02:35 +0000
(09:02 +0100)
No functional change, just use an existing helper.
Signed-off-by: Petr Tesarik <petr.tesarik.ext@huawei.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
kernel/dma/swiotlb.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/dma/swiotlb.c
b/kernel/dma/swiotlb.c
index 91454b513db069146e2c2653f296e8309601d658..3856e2b524b477e3885654f2c41283bcb102d795 100644
(file)
--- a/
kernel/dma/swiotlb.c
+++ b/
kernel/dma/swiotlb.c
@@
-695,10
+695,7
@@
found:
/*
* Update the indices to avoid searching in the next round.
*/
- if (index + nslots < mem->area_nslabs)
- area->index = index + nslots;
- else
- area->index = 0;
+ area->index = wrap_area_index(mem, index + nslots);
area->used += nslots;
spin_unlock_irqrestore(&area->lock, flags);
return slot_index;