sfp_bus_put(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… sfp_bus_put(9) β€” from the Kernel API Manual, bestie

okay so you found a function called sfp_bus_put and you're like "what does putting a bus even mean" β€” don't worry, it's actually so simple and honestly kind of iconic. it's a refcount drop. that's the whole vibe. πŸ¦‹


✨ NAME ✨

sfp_bus_put β€” put a reference on the &struct sfp_bus πŸ‘‘ (yes, that's literally the job, no cap)


🌸 SYNOPSIS 🌸

void sfp_bus_put (struct sfp_bus *bus );

that's it. that's the whole function signature. one arg, void return, main character energy only. ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • bus β€” the struct sfp_bus that you got from sfp_bus_find_fwnode. like, the one you already found earlier with that other function. you're not inventing a new one here, you're just handing back the one you're holding. 🫢

πŸ’– DESCRIPTION πŸ’–

so here's the tea: sfp_bus_put puts a reference on the struct sfp_bus, and β€” this is the important part β€” it frees the underlying structure if this was the last reference. πŸ”₯

like, refcounting is basically a group chat where everyone who's still interested keeps the chat alive. sfp_bus_put is you leaving the chat. if you were the last one in there, the chat gets deleted. if other people are still in it, the chat lives on, no drama. πŸ’€

so yeah β€” drop your reference, and maybe it also frees everything. you don't get to decide which; the refcount decides. slay. πŸ’…


⭐ SEE ALSO ⭐


lowkey read the sfp_bus_find_fwnode(9) page first β€” that's where your bus comes from, iykyk. 🌈

okay bye bestie, go forth and release your references responsibly πŸ’œ

β€” with love from ./drivers/net/phy, dated October 2026, page sfp_bus_put(9) πŸŒΈπŸŽ€πŸ¦‹

πŸ“¦ where this page comes from