drm_mm_for_each_node_safe(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ drm_mm_for_each_node_safe ✨

okay bestie, so this is a page from the Kernel API Manual (yes, the kernel has its own manual, she's iconic) and it's all about drm_mm_for_each_node_safe β€” the iterator that walks over all allocated nodes πŸ’…


🌸 NAME 🌸

drm_mm_for_each_node_safe β€” an iterator to walk over all allocated nodes πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

drm_mm_for_each_node_safe (entry , next , mm );

πŸ’– ARGUMENTS πŸ’–

  • entry β€” a struct drm_mm_node that gets assigned to on every iteration step. this is literally your main character, the node you're looking at rn πŸ‘‘
  • next β€” a struct drm_mm_node where the next step gets stored. it's holding the next look for you, no cap 🫢
  • mm β€” the drm_mm allocator you're walking through. the whole vibe check happens in here ✨

πŸ”₯ DESCRIPTION πŸ”₯

so the way that this works: this iterator walks over all the nodes in the range allocator. that's it, that's the function πŸ’€

it's implemented with list_for_each_safe, which means it is safe against removal of elements β€” so you can delete stuff mid-walk and it won't fall apart on you. slay. πŸ’…

ngl, that "safe" in the name is doing real work here β€” that's the whole reason next exists as its own argument. 🧚

🌈 SEE ALSO 🌈

Kernel file ./include/drm/drm_mm.h, plus the whole friend group:


⭐ ok that's the page!! this one shipped from ./include/drm in October 2026 β€” so go forth and iterate safely, bestie, you've got this πŸ’œπŸŽ€πŸ¦‹

πŸ“¦ where this page comes from