devm_remove_action_nowarn(9)
π 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 tbhdataβ 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 β
0on success β slay β¨-ENOENTif 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
- 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