of_reserved...ource_byname(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

of_reserved_mem_region_to_resource_byname β€” okay so this one grabs a reserved memory region and hands it back to you as a resource, bestie ✨

This page lives in the Kernel API Manual, and the function it's hyping up is literally called of_reserved...ource_byname(9) (yes the name is a whole mood, we don't question it) πŸŽ€


🌸 SYNOPSIS 🌸

int of_reserved_mem_region_to_resource_byname (const struct device_node
       *np , const char *name , struct resource *res );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • np β€” the node that's holding the 'memory-region' property. like, the one carrying the goods πŸ’…
  • name β€” the name of the 'memory-region' property entry you wanna look up. it's giving "which one tho" 🧚
  • res β€” a pointer to a struct resource that gets filled in with the reserved region. she's the vessel, she gets filled, we love her 🫢

✨ DESCRIPTION ✨

So here's the vibe: this function lets drivers look up a node's 'memory-region' property entries by name, and then it hands you back a struct resource for whichever entry you asked for. no cap, that's the whole thing πŸ’€

It returns 0 on success, with res filled in β€” iconic behaviour πŸ‘‘ β€” or a negative error-code on failure. so yeah, check your return values, bestie, this is not the place to be asleep 😭


πŸ’œ SEE ALSO πŸ’œ

Kernel file: ./drivers/of/of_reserved_mem.c


quick reminder that res only means anything when the return is 0, so like… actually look at the return code before you go dereferencing anything, i'm begging πŸ™ˆ

and that's the page, bestie!! πŸ“ this little baddie comes to you from ./drivers/of, dated October 2026, and it answers to the name of_reserved...ource_byname(9) β€” go off, you beautiful truncated legend πŸŒˆβœ¨πŸ’…

πŸ“¦ where this page comes from