[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: documentation flaw



Frank,

I agree. I did a mistake when I first tried to understand the code. Back then I probably didn't know that the function returns the amount of code that couldn't be copied. Later I haven't observed the incorrectness in the documentation.

The text should be changed to "calculating the actual number of non-copied bytes", I think.

Also a comment should be added about the do{}while(0) construction with a link to the (my?) explanation of this in the FAQ.

A comment that the "lea 0(%3,%0,4),%0" instruction actually works as "%ecx = (size % 4) + %ecx * 4" (as a C-like expression/statement" could also be added.

  /Per

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/