devm_remove_action_nowarn(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… devm_remove_action_nowarn(9) πŸ’…

ok so bestie, this is a page straight out of the Kernel API Manual and honestly? it's a lil niche but we're gonna get through it together 🫢


✨ NAME ✨

devm_remove_action_nowarn β€” removes previously added custom action

like, it takes an action you added before and it removes it. no cap.


πŸŽ€ SYNOPSIS πŸŽ€

int devm_remove_action_nowarn (struct device *dev , void (*action)(void
*) , void *data );

🌸 ARGUMENTS 🌸

  • dev β€” the device that owns the action, its whole vibe is ownership πŸ’–
  • action β€” the function that actually implements the action, the main character tbh
  • data β€” pointer to the data that gets passed to the action implementation

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the tea: it removes an instance of action that was previously added by devm_add_action. Both action and data should match one of the existing entries β€” like, it's gotta be the actual one you added, not a lookalike, iykyk. πŸ”

Now the difference from devm_remove_action? In contrast to devm_remove_action, this function does not WARN if no entry could have been found. no warning, no drama, it just quietly doesn't find it. πŸ’€

⚠️ Girl, listen β€” this should only be used if the action is contained in an object with independent lifetime management, e.g. the Devres rust abstraction. That's the whole point of the "nowarn" version.

And causing the warning from regular driver code most likely indicates an abuse of the devres API. 😭 Like bestie... why are you in the regular driver code doing this. That warning is a vibe check and you failed it. πŸ™ˆ


⭐ RETURN ⭐

  • 0 on success β€” slay ✨
  • -ENOENT if no entry could have been found

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/base/devres.c β€” plus this whole friend group right here: __devres_alloc_node(9), devres_for_each_res(9), devres_free(9), devres_add(9), devres_find(9), devres_get(9), devres_remove(9), devres_destroy(9), devres_release(9), devres_release_all(9), devres_open_group(9), devres_close_group(9), devres_remove_group(9), devres_release_group(9), __devm_add_action(9), devm_release_action(9), devm_kmalloc(9), devm_krealloc(9), devm_kstrdup(9), devm_kstrdup_const(9), devm_kvasprintf(9), devm_kasprintf(9), devm_kfree(9), devm_kmemdup(9), devm_kmemdup_const(9), devm_get_free_pages(9), devm_free_pages(9), __devm_alloc_percpu(9)


okay that's the whole page bestie, you ate that πŸ’…βœ¨

coming at you from ./drivers/base, dated October 2026 β€” mwah, go touch some devres πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from