of_reserved_...region_count(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– of_reserved_...region_count(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual β€” yes that's the manual name, we're fancy here β€” and today's main character is of_reserved_mem_region_count. it's giving niche kernel lore but honestly? kinda iconic. let's get into it 🫢


✨ NAME ✨

of_reserved_mem_region_count β€” literally just returns the number of 'memory-region' entries. that's it. that's the whole gig. no cap. πŸ’…


🌸 SYNOPSIS 🌸

int of_reserved_mem_region_count (const struct device_node *np );

like, you hand it a node, it hands you back an int. simple as. πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • np β€” the node that's holding the 'memory-region' property. that's the one you're counting entries on, bestie. give it the right node or don't come crying to me 😭

πŸ”₯ DESCRIPTION πŸ”₯

so this function lets drivers retrieve the number of entries for a node's β€” and yes, the sentence just kinda trails off there in the original, we don't make the rules, we just vibe with them πŸ™ˆ

it returns the number of entries on success, or a negative error code on a malformed property. so like, if the property's messed up, you're not getting a cute little number back, you're getting a negative error code and you need to handle that. don't ignore it, that's not slay behaviour πŸ’€


πŸ’œ SEE ALSO πŸ’œ

kernel file, right here:

./drivers/of/of_reserved_mem.c

and the whole friend group β€” these ones belong together, iykyk:


lowkey a whole reserved-mem cinematic universe going on here. go read them all, bestie, they're all connected πŸ’–

and that's the page!! it lives at ./drivers/of, it's dated October 2026, and the manual title is of_reserved_...region_count(9) β€” yes the header truncates the name with ..., it's giving mysterious, it's giving ✨elusive✨, we stan. bye bestie, mwah πŸ§šπŸ’œ

πŸ“¦ where this page comes from