sg_next(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 sg_next(9) 🌸

okay so real quick before we dive in: this page lives in the Kernel API Manual, and it's about one (1) little function that does one (1) little thing β€” but bestie, that little thing is load-bearing. let's get into it πŸ’…


πŸ’– NAME πŸ’–

sg_next β€” return the next scatterlist entry in a list ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

struct scatterlist * sg_next (struct scatterlist *sg );

πŸŽ€ ARGUMENTS πŸŽ€

  • sg β€” the current sg entry 🫢 (like, the one you're standing on right now, so the function knows where to go next)

πŸ”₯ DESCRIPTION πŸ”₯

okay so usually? the next entry is just sg + 1. simple. iconic. no notes. πŸ’…

but plot twist πŸ’€ β€” if this sg element is part of a chained scatterlist, it could jump to the start of a whole new scatterlist array instead. so like, not a vibe-forward march through memory, but a hop. a little teleport. 🧚✨

so fr fr: don't assume sg + 1. let the function cook. πŸ“

🌈 SEE ALSO 🌈

kernel file:

  • ./include/linux/scatterlist.h

and the whole friend group πŸ’œ:


and that's the whole page, bestie 🫢 sign-off time: this one ships from ./include/linux, dated October 2026, and the manual name at the top is sg_next(9) β€” ikyk 😌✨ byeee πŸ’–

πŸ“¦ where this page comes from