Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\scatterlist.c Create Date:2022-07-28 06:20:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:sg_zero_buffer - Zero-out a part of a SG list*@sgl: The SG list*@nents: Number of SG entries*@buflen: The number of bytes to zero out*@skip: Number of bytes to skip before zeroing* Returns the number of bytes zeroed.

Proto:size_t sg_zero_buffer(struct scatterlist *sgl, unsigned int nents, size_t buflen, off_t skip)

Type:size_t

Parameter:

TypeParameterName
struct scatterlist *sgl
unsigned intnents
size_tbuflen
off_tskip
958  offset = 0
960  sg_flags = use kmap_atomic | lush back to phys on unmap
962  sg_miter_start - start mapping iteration over a sg list*@miter: sg mapping iter to be started*@sgl: sg list to iterate over*@nents: number of sg entries* Description:* Starts mapping iterator @miter.* Context:* Don't care.
964  If Not sg_miter_skip - reposition mapping iterator*@miter: sg mapping iter to be skipped*@offset: number of bytes to plus the current location* Description:* Sets the offset of @miter to its current location plus @offset bytes Then Return false
967  When offset < buflen && sg_miter_next - proceed mapping iterator to the next mapping*@miter: sg mapping iter to proceed* Description:* Proceeds @miter to the next mapping. @miter should have been started* using sg_miter_start(). On successful return, @miter->page, cycle
970  len = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value( length of the mapped area , buflen - offset)
971  memset( pointer to the mapped area , 0, len)
973  offset += len
976  sg_miter_stop - stop mapping iteration*@miter: sg mapping iter to be stopped* Description:* Stops mapping iterator @miter. @miter should have been started* using sg_miter_start(). A stopped iteration can be resumed by* calling sg_miter_next() on it
977  Return offset