drmm_add_action_or_reset(9)
β¨ drmm_add_action_or_reset(9) β¨
okay so this is from the Kernel API Manual and it's literally called drmm_add_action_or_reset β say that five times fast, i can't π β and it's all about adding a managed release action to a &drm_device. bestie, it's giving cleanup crew energy and we're obsessed.
πΈ NAME πΈ
drmm_add_action_or_reset β add a managed release action to a &drm_device
like, that's the whole vibe. u add an action, it gets managed for u. slay.
π SYNOPSIS π
drmm_add_action_or_reset (dev , action , data );
yes that's the whole signature, no cap. three args, in, out, done β¨
π¦ ARGUMENTS π¦
devβ the DRM device. ur main character here, the one everything hangs off of πactionβ the function that should be called whendevis released. this is the cleanup queen, she gets her moment eventually πdataβ an opaque pointer that gets passed toaction. like a little gift bag u hand over at the door, contents unspecified, no questions asked π
π DESCRIPTION π
so it's similar to drmm_add_action, and honestly the only difference β the one singular plot twist β is that upon failure, action is directly called for any cleanup work necessary on failures. like, if the add doesn't work out, she doesn't ghost u, she shows up immediately and handles the cleanup herself. fr fr, that's the entire difference. no extra lore, no hidden behaviour, that's it π
ngl this is the "or_reset" part doing the heavy lifting in the name β the failure path calls action right away instead of leaving u hanging. iconic behaviour honestly π«Ά
π₯ SEE ALSO π₯
- Kernel file
./include/drm/drm_managed.hβ go read it, it's right there π drmm_add_action(9)drmm_kzalloc(9)drmm_kmalloc_array(9)drmm_kcalloc(9)drmm_mutex_init(9)drmm_alloc_ordered_workqueue(9)
the whole managed-allocation friend group, it's giving squad goals π§
and that's the page bestie!! sourced from ./include/drm, dated October 2026 β future girlies stay winning βπ bye ily π
π¦ 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