of_reserved_...region_count(9)
π 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:
fdt_scan_reserved_mem_late(9)fdt_fixup_reserved_mem_node(9)fdt_validate_reserved_mem_node(9)__reserved_mem_init_node(9)fdt_init_reserved_mem_node(9)of_reserved_mem_device_init_by_idx(9)of_reserved_mem_device_init_by_name(9)of_reserved_mem_device_release(9)devm_of_reserved_mem_device_init(9)of_reserved_mem_lookup(9)of_reserved_mem_region_to_resource(9)of_reserved_mem_region_to_resource_byname(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms