Re: [RFC PATCH] /dev/mem: Add initial documentation of memory_open() and mem_fops
From: Greg KH
Date: Sat Aug 23 2025 - 04:01:35 EST
On Sat, Aug 23, 2025 at 09:48:32AM +0200, Gabriele Paoloni wrote:
> > > > > + * - The file position '*ppos' shall be advanced by the number of bytes
> > > > > + * successfully copied from user space (including skipped bytes).
> > > >
> > > > No short summary first of what the function is supposed to do normally?
> > > > Or are you relying on the few words at the top to summarize that?
> > >
> > > Function's expectations would define the testable behaviours (so they
> > > are broken down into detailed expectations); nothing prevents to provide
> > > an informative intro above "Function's expectations"; I could clarify this
> > > in the patch for the doc-guide and revisit this patch with informative intros
> > > for all the functions....
> >
> > "testable behavior" is going to be very hard given that you are
> > describing an internal-to-the-kernel function. Good luck!
>
> Well that is something to be figured out (step by step :-) )
Well what is your end-goal here? Do you need/want all functions in the
kernel to be documented like this, or do you only want those that are
describing user-visable functionality?
What is the requirement that is causing you to do this work?
thanks,
greg k-h