__of_prop_dup(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– __of_prop_dup β€” the Kernel API Manual, bestie edition πŸŽ€

okay so welcome to the <lavender>Kernel API Manual</lavender> entry for __of_prop_dup(9) β€” yes the double underscore is load-bearing, we do not abbreviate her name πŸ’…


✨ NAME ✨

__of_prop_dup β€” copy a property, but like… dynamically πŸ¦‹


🌸 SYNOPSIS 🌸

struct property * __of_prop_dup (const struct property *prop , gfp_t
       allocflags );

πŸŽ€ ARGUMENTS πŸŽ€

  • prop β€” the property you wanna copy. your blorbo. the one getting duplicated 🫢
  • allocflags β€” the allocation flags (typically pass GFP_KERNEL, that's the standard vibe ✨)

πŸ”₯ DESCRIPTION πŸ”₯

so the way this works is: it copies a property by dynamically allocating the memory for both the property structure and the property name & contents πŸ’€ like, it's not doing a shallow little copy, it's allocating memory for real, no cap.

and here's the iconic part β€” the property's flags get the OF_DYNAMIC bit set ⭐ so we can tell the difference between dynamically allocated properties and the ones that are not. that's literally the whole point, iykyk.


🌈 RETURN 🌈

it hands you back the newly allocated property β€” or NULL on out of memory error 😭 (fr fr, check for the NULL, bestie, please).


πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./drivers/of/dynamic.c β€” yes, that's the one, go look πŸ‘€

and the whole friend group:


that's the whole page, you ate it, you're a kernel dev now πŸ§šπŸ’œ

so like, credit where credit's due: this one's from ./drivers/of, it's the October 2026 edition, and it says __of_prop_dup(9) at the bottom because that's just how manpages do πŸ“ mwah, bye bestie πŸ’–

πŸ“¦ where this page comes from