kunit_softwa...ode_register(9)
π« kunit_software_node_register(9) π«
okay bestie, so this is a page from the Kernel API Manual β yes, that Kernel API Manual β and it's about kunit_software_node_register, which lowkey is a little icon in the kunit world. let's get into it π
β¨ NAME β¨
kunit_software_node_register β register a kunit-managed software node. yep, that's the whole vibe: you hand it a node, kunit takes care of it for you π«Ά
πΈ SYNOPSIS πΈ
struct fwnode_handle * kunit_software_node_register (struct kunit *test
, const struct software_node *swnode );
copy that exactly, bestie, don't be cute with the signature π
π¦ ARGUMENTS π¦
testβ the test context. it's the kunit test you're registering this node for, the whole reason any of this is happening nglswnodeβ the software node you want to register. this is the actual thing, the main character of the operation β
π§ DESCRIPTION π§
so here's the tea: you call this, and it registers a test-managed software node, then hands you back its firmware node handle. that's it, that's the function π
and the best part? the software node gets unregistered automatically after the test case completes. not you having to clean up, not you having to remember anything β kunit handles it. it's giving responsible bestie energy, fr fr π
π RETURN π
it returns the firmware node handle of the registered software nodeβ¦ or IS_ERR on failure. so like, check your error codes, babe, don't just assume it slayed π
no cap, if it fails you get IS_ERR β that's your signal to handle it properly.
π₯ SEE ALSO π₯
- Kernel file
./lib/kunit/fwnode.cβ the source, go read it, iykyk kunit_fwnode_create_software_node(9)kunit_software_node_register_node_group(9)kunit_device_add_software_node(9)
okay that's the page!! go forth and register your nodes, you've got this π«Άπ
β and a cute little sign-off: this one lives in ./lib/kunit, dated October 2026, straight from the Kernel API Manual, and it's called kunit_software_node_register(9) in case you forgot already ππΈ
π¦ 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