On Sat, Aug 31, 2024 at 10:13 PM Alexey Dobriyan <adobriyan@xxxxxxxxx> wrote: > > Why do they duplicate the code 1:1? I am not sure I understand your question. Documentation establishes what a function is expected to do. Code implements the function. Callers should not need to reverse engineer the design/code to take advantage of a function. Yes, in some cases, it may be trivial to infer what the function is supposed to do by reading its implementation, and thus documentation may seem redundant. But even in simple cases, one still needs to assume the implementation has no bugs in order to do that. And in non-trivial cases, the documentation is even more valuable. It is true that in many places in the kernel there is not much code documentation. However, for Rust code, we are trying to improve on that. Cheers, Miguel