@@ -322,10 +322,10 @@ action (e.g. reduce current DMA mapping usage or delay and try again later).
322322 dma_map_sg(struct device *dev, struct scatterlist *sg,
323323 int nents, enum dma_data_direction direction)
324324
325- Returns: the number of DMA address segments mapped (this may be shorter
326- than <nents> passed in if some elements of the scatter/gather list are
327- physically or virtually adjacent and an IOMMU maps them with a single
328- entry ).
325+ Maps a scatter/gather list for DMA. Returns the number of DMA address segments
326+ mapped, which may be smaller than <nents> passed in if several consecutive
327+ sglist entries are merged (e.g. with an IOMMU, or if some adjacent segments
328+ just happen to be physically contiguous ).
329329
330330Please note that the sg cannot be mapped again if it has been mapped once.
331331The mapping process is allowed to destroy information in the sg.
@@ -349,9 +349,8 @@ With scatterlists, you use the resulting mapping like this::
349349where nents is the number of entries in the sglist.
350350
351351The implementation is free to merge several consecutive sglist entries
352- into one (e.g. with an IOMMU, or if several pages just happen to be
353- physically contiguous) and returns the actual number of sg entries it
354- mapped them to. On failure 0, is returned.
352+ into one. The returned number is the actual number of sg entries it
353+ mapped them to. On failure, 0 is returned.
355354
356355Then you should loop count times (note: this can be less than nents times)
357356and use sg_dma_address() and sg_dma_len() macros where you previously
0 commit comments