cb710_sg_dwi...e_next_block(9)
π 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 π₯
- Kernel file
./drivers/misc/cb710/sgbuf2.c cb710_sg_dwiter_read_next_block(9)β the read girlie, her sister function π
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms