Document this function to make clear the expected behavior of the 'value' parameter. It was intended to match the behavior of POSIX memset as laid out here: https://lore.kernel.org/dmaengine/YejrA5ZWZ3lTRO%2F1@matsya/
Showing the changes to include (1 of 2 files). Show all
Unified · Split
| @@ -1030,6 +1030,14 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_interleaved_dma( · 1029 unmodified lines | ||
| 1030 | 1030 | return chan->device->device_prep_interleaved_dma(chan, xt, flags); |
| 1031 | 1031 | } |
| 1032 | 1032 | |
| 1033 | +/** | |
| 1034 | + * dmaengine_prep_dma_memset() - Prepare a DMA memset descriptor. | |
| 1035 | + * @chan: The channel to be used for this descriptor | |
| 1036 | + * @dest: Address of buffer to be set | |
| 1037 | + * @value: Treated as a single byte value that fills the destination buffer | |
| 1038 | + * @len: The total size of dest | |
| 1039 | + * @flags: DMA engine flags | |
| 1040 | + */ | |
| 1033 | 1041 | static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_memset( |
| 1034 | 1042 | struct dma_chan *chan, dma_addr_t dest, int value, size_t len, |
| 1035 | 1043 | unsigned long flags) |