lkml.org 
[lkml]   [2020]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH rdma-next 2/4] lib/scatterlist: Add support in dynamically allocation of SG entries
From
Date

On 9/7/2020 10:29 AM, Christoph Hellwig wrote:
>> +static inline void _sg_chain(struct scatterlist *chain_sg,
>> + struct scatterlist *sgl)
>> +{
>> + /*
>> + * offset and length are unused for chain entry. Clear them.
>> + */
>> + chain_sg->offset = 0;
>> + chain_sg->length = 0;
>> +
>> + /*
>> + * Set lowest bit to indicate a link pointer, and make sure to clear
>> + * the termination bit if it happens to be set.
>> + */
>> + chain_sg->page_link = ((unsigned long) sgl | SG_CHAIN) & ~SG_END;
>> +}
> Please call this __sg_chain to stick with our normal kernel naming
> convention.

Will do.

\
 
 \ /
  Last update: 2020-09-07 14:42    [W:0.060 / U:1.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site