qmi_decode_basic_elem(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

qmi_decode_basic_elem πŸ’…

okay bestie, welcome to the qmi_decode_basic_elem(9) page β€” yes that's the section 9 kernel API manual, we're in the drivers/soc/qcom part of the tree and honestly it's giving main character energy. sit down, drink some water, let's decode some elements ✨


✨ NAME ✨

qmi_decode_basic_elem β€” decodes elements of basic/primary data type πŸŽ€


🌸 SYNOPSIS 🌸

int qmi_decode_basic_elem (void *buf_dst , const void *buf_src , u32
elem_len , u32 elem_size );

like yes, four args, all of them matter, no cap πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • buf_dst β€” the buffer where the decoded element goes. it's the destination, the place we're landing, the whole point 🫢
  • buf_src β€” the buffer holding the elements in QMI wire format. this is where the info currently lives, in its little encoded form 😭
  • elem_len β€” how many elements we're decoding. like the count, not the size, don't get it twisted πŸ’€
  • elem_size β€” the size of a single instance of the element being decoded. one (1) element's worth of bytes, periodt ⭐

🧚 DESCRIPTION 🧚

so this function decodes "elem_len" number of elements β€” in QMI wire format, each one "elem_size" bytes big β€” out of the source buffer "buf_src", and stores the decoded versions into the destination buffer "buf_dst". literally that's the whole job πŸŽ€

the elements are of primary data type, which includes u8 - u64 or similar. so like, the basic little guys, not structs, not strings, just the primary types being iconic πŸ’œ

and when it's done, the function returns the number of bytes of decoded information. so you get a size back, bestie, that's your receipt πŸ”₯


πŸ‘‘ RETURN πŸ‘‘

on success: the total size of the decoded data elements, in bytes 🌈

on error: a negative errno. so if you see a negative number, that's not a size, that's a warning sign, do not pass go 😭


πŸ’– SEE ALSO πŸ’–

like the whole encdec friend group, honestly obsessed 🫢✨


aaaand that's the page!! sourced from ./drivers/soc/qcom, dated October 2026 β€” yeah, the future, we're ahead of schedule πŸ’… no cap, go forth and decode responsibly, mwah πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from