---
name: "kfifo_dma_out_prepare"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/kfifo_dma_out_prepare"
---

# kfifo\_dma\_out\_prepare(9)

setup a scatterlist for DMA output

## NAME

kfifo\_dma\_out\_prepare - setup a scatterlist for DMA output

## SYNOPSIS

**kfifo\_dma\_out\_prepare(***fifo***,** *sgl***,** *nents***,** *len***);**

## ARGUMENTS

*fifo*

address of the fifo to be used

*sgl*

pointer to the scatterlist array

*nents*

number of entries in the scatterlist array

*len*

number of elements to transfer

## DESCRIPTION

This macro fills a scatterlist for DMA output which at most *len* bytes to transfer. It returns the number entries in the scatterlist array. A zero means there is no space available and the scatterlist is not filled.

Note that with only one concurrent reader and one concurrent writer, you don't need extra locking to use these macros.

## COPYRIGHT
