参照元

説明

引数

返り値

参考

実装

/**
 * sg_next - return the next scatterlist entry in a list
 * @sg:         The current sg entry
 *
 * Description:
 *   Usually the next entry will be @sg@ + 1, but if this sg element is part
 *   of a chained scatterlist, it could jump to the start of a new
 *   scatterlist array.
 *
 **/
struct scatterlist *sg_next(struct scatterlist *sg)
{
#ifdef CONFIG_DEBUG_SG
        BUG_ON(sg->sg_magic != SG_MAGIC);
#endif
        if (sg_is_last(sg))
                return NULL;
        sg++;
        if (unlikely(sg_is_chain(sg)))
                sg = sg_chain_ptr(sg);
        return sg;
}
EXPORT_SYMBOL(sg_next);

コメント


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS