cb710_sg_dwi...e_next_block(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

cb710_sg_dwiter_write_next_block β€” bestie, this is the one that writes the next 32-bit word into the sg buffer ✨

So like, quick vibe check: this page lives in the Kernel API Manual (that's the manual name, iykyk), and it's all about pushing one lil 32-bit word out into an sg buffer. Slay.


🌸 SYNOPSIS 🌸

void cb710_sg_dwiter_write_next_block (struct sg_mapping_iter *miter ,
uint32_t data );

πŸŽ€ ARGUMENTS πŸŽ€

  • miter β€” the sg mapping iterator that's doing the writing, no cap πŸ’…
  • data β€” the actual data you're writing to the sg buffer, periodt

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the tea β˜•: this function writes a 32-bit word starting at the byte that miter is pointing at, and it handles any alignment issues along the way β€” she's flexible like that 🧚

Any bytes that would end up written past the end of the buffer? Yeah those get silently discarded. Not a crash, not an error, just... gone. Poof. πŸ™ˆ

And then miter gets advanced by 4 bytes, or to the end of the buffer β€” whichever one is closer. Main character energy honestly πŸ‘‘


⭐ CONTEXT ⭐

Same requirements as in sg_miter_next. That's it, that's the whole vibe check 🫢


πŸ”₯ SEE ALSO πŸ”₯


Heads up bestie: that "silently discarded" bit is real β€” there's no error return here, so if you're writing past the end of the buffer you literally will not be told 😭 Plan accordingly fr fr.

That's the whole page!! πŸŽ€ Written for the ./drivers/misc/cb710 source, dated October 2026 β€” go off, you understand Unix now, I'm so proud of you πŸ’–βœ¨

πŸ“¦ where this page comes from