tb_nvm_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ tb_nvm_alloc(9) ✨

okay so bestie, this one's a kernel API manual page β€” tb_nvm_alloc β€” and it's literally the function that makes you a fresh NVM struct. That's the whole vibe. πŸ’–


🌸 NAME 🌸

tb_nvm_alloc β€” allocate a shiny new NVM structure, no cap


πŸŽ€ SYNOPSIS πŸŽ€

struct tb_nvm * tb_nvm_alloc (struct device *dev );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the device that owns the NVM, like it's the parent and the NVM is its baby 🫢

πŸ’… DESCRIPTION πŸ’…

So what it does: it allocates a brand-new NVM structure, gives it a unique id (yes, every single one gets its own, iconic), and hands it right back to you. That's it. That's the function. ✨


πŸ‘‘ RETURN πŸ‘‘

  • Pointer to struct tb_nvm β€” on success, obviously, slay πŸ’…
  • -EOPNOTSUPP β€” this is the "girl I don't know her" era: it comes back if the NVM format of the dev is not known by the kernel 😭
  • ERR_PTR β€” in case of failure, fr fr

🌈 SEE ALSO 🌈

Kernel file ./drivers/thunderbolt/nvm.c, plus the whole friend group:


quick reminder bestie: if you get -EOPNOTSUPP back, it's not you, it's the kernel not recognising that NVM format πŸ’€ don't take it personally.

okay that's the page!! this one lives in ./drivers/thunderbolt, October 2026 edition, so go off and allocate responsibly πŸŽ€πŸ’œ

β€” xoxo, your local kernel bestie πŸ§šβ€β™€οΈβ­

πŸ“¦ where this page comes from