qcom_smem_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… qcom_smem_get(9) πŸ’…

okay bestie so this is a page from the Kernel API Manual and it's literally the whole tea on qcom_smem_get β€” a kernel function that hands you a pointer to a smem item. yes we're doing pointers today, hydrate first 🫢


✨ NAME ✨

qcom_smem_get β€” resolve ptr of size of a smem item

like, you give it the vibe (a host and an item handle) and it gives you back the pointer plus how big the thing actually is. iconic behaviour tbh πŸ’…


🌸 SYNOPSIS 🌸

void * qcom_smem_get (unsigned int host , unsigned int item , size_t *size );

look at her. three args, one return, zero drama (unless there's an error, then there's a little drama β€” see RETURN, iykyk) 😭


πŸŽ€ ARGUMENTS πŸŽ€

  • host β€” the remote processor, or -1. yes literally -1, she's valid, don't come for her πŸ’€
  • item β€” the smem item handle. this is your ticket to the thing you want πŸ”₯
  • size β€” pointer to be filled out with size of the item. you pass her in empty, she comes back with the size. glow-up ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the whole thing: she looks up the smem item, and returns a pointer to it. that's the main character energy right there πŸ‘‘

and the size of the smem item? it gets returned in size β€” the pointer you handed her. so you're not just getting a ptr, you're getting the measurements too. obsessed πŸ“


⭐ RETURN ⭐

a pointer to an SMEM item on success, ERR_PTR on failure πŸ’€

so like… check it. don't just rawdog the dereference, bestie, we've talked about this πŸ™ˆ


🌈 SEE ALSO 🌈

that's a whole friend group fr fr β€” go say hi to all of them πŸ’œ


no cap: read the RETURN section again. ERR_PTR is real and she will show up. πŸ’…

k bye bestie, this one lives in ./drivers/soc/qcom and the version vibes are dated October 2026 β€” go forth and resolve those pointers responsibly πŸ§šβ€β™€οΈπŸ’–βœ¨

πŸ“¦ where this page comes from