]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
lib/scatterlist: cleanup macros into static inline functions
authorLogan Gunthorpe <logang@deltatee.com>
Wed, 17 Nov 2021 21:53:48 +0000 (14:53 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 22 Dec 2021 08:21:43 +0000 (09:21 +0100)
commitf857acfc457ea63fa5b862d77f055665d863acfe
tree9695549233e2146de982e347f5493098e3b96c2d
parent28e4576d556bca543b0996e9edd4b767397e24c6
lib/scatterlist: cleanup macros into static inline functions

Convert the sg_is_chain(), sg_is_last() and sg_chain_ptr() macros
into static inline functions. There's no reason for these to be macros
and static inline are generally preferred these days.

Also introduce the SG_PAGE_LINK_MASK define so the P2PDMA work, which is
adding another bit to this mask, can do so more easily.

Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
include/linux/scatterlist.h