History

Merge tag 'dma-mapping-5.8-5' of git://git.infradead.org/users/hch/dma-mapping

Pull dma-mapping fixes from Christoph Hellwig: - add a warning when the atomic pool is depleted (David Rientjes) - protect the parameters of the new scatterlist helper macros (Marek Szyprowski ) * tag 'dma-mapping-5.8-5' of git://git.infradead.org/users/hch/dma-mapping: scatterlist: protect parameters of the sg_table related macros dma-mapping: warn when coherent pool is depleted

Linus Torvalds committed 6 years ago

Commit 1bfde032 parents 25aadbd 68d23702 files · +9 −5Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/scatterlist.h+4−4
@@ -155,7 +155,7 @@ static inline void sg_set_buf(struct scatterlist *sg, const void *buf, · 154 unmodified lines
155155 * Loop over each sg element in the given sg_table object.
156156 */
157157 #define for_each_sgtable_sg(sgt, sg, i) \
158− for_each_sg(sgt->sgl, sg, sgt->orig_nents, i)
158+ for_each_sg((sgt)->sgl, sg, (sgt)->orig_nents, i)
159159
160160 /*
161161 * Loop over each sg element in the given *DMA mapped* sg_table object.
@@ -163,7 +163,7 @@ static inline void sg_set_buf(struct scatterlist *sg, const void *buf, · 1 unmodified line
163163 * of the each element.
164164 */
165165 #define for_each_sgtable_dma_sg(sgt, sg, i) \
166− for_each_sg(sgt->sgl, sg, sgt->nents, i)
166+ for_each_sg((sgt)->sgl, sg, (sgt)->nents, i)
167167
168168 /**
169169 * sg_chain - Chain two sglists together
@@ -451,7 +451,7 @@ sg_page_iter_dma_address(struct sg_dma_page_iter *dma_iter) · 281 unmodified lines
451451 * See also for_each_sg_page(). In each loop it operates on PAGE_SIZE unit.
452452 */
453453 #define for_each_sgtable_page(sgt, piter, pgoffset) \
454− for_each_sg_page(sgt->sgl, piter, sgt->orig_nents, pgoffset)
454+ for_each_sg_page((sgt)->sgl, piter, (sgt)->orig_nents, pgoffset)
455455
456456 /**
457457 * for_each_sgtable_dma_page - iterate over the DMA mapped sg_table object
@@ -465,7 +465,7 @@ sg_page_iter_dma_address(struct sg_dma_page_iter *dma_iter) · 7 unmodified lines
465465 * unit.
466466 */
467467 #define for_each_sgtable_dma_page(sgt, dma_iter, pgoffset) \
468− for_each_sg_dma_page(sgt->sgl, dma_iter, sgt->nents, pgoffset)
468+ for_each_sg_dma_page((sgt)->sgl, dma_iter, (sgt)->nents, pgoffset)
469469
470470
471471 /*

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