Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: Document dmaengine_prep_dma_memset

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/

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Link: https://lore.kernel.org/r/20220301182551.883474-2-benjamin.walker@intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Ben Walker and committed by
Vinod Koul
fc44ff0a 439b5e76

+14
+6
Documentation/driver-api/dmaengine/provider.rst
··· 206 206 - The device is able to perform parity check using RAID6 P+Q 207 207 algorithm against a memory buffer. 208 208 209 + - DMA_MEMSET 210 + 211 + - The device is able to fill memory with the provided pattern 212 + 213 + - The pattern is treated as a single byte signed value. 214 + 209 215 - DMA_INTERRUPT 210 216 211 217 - The device is able to trigger a dummy transfer that will
+8
include/linux/dmaengine.h
··· 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)