[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2025082126-sulfite-unwired-c58c@gregkh>
Date: Thu, 21 Aug 2025 19:35:38 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Gabriele Paoloni <gpaoloni@...hat.com>
Cc: arnd@...db.de, linux-kernel@...r.kernel.org,
safety-architecture@...ts.elisa.tech
Subject: Re: [RFC PATCH] /dev/mem: Add initial documentation of memory_open()
and mem_fops
On Thu, Aug 21, 2025 at 07:04:19PM +0200, Gabriele Paoloni wrote:
> This patch proposes initial kernel-doc documentation for memory_open()
> and most of the functions in the mem_fops structure.
> The format used for the **Description** intends to define testable
> function's expectations and Assumptions of Use to be met by the
> user of the function.
>
> Signed-off-by: Gabriele Paoloni <gpaoloni@...hat.com>
> ---
> I have a couple of comments from this documentation activity:
> 1) Shouldn't the check in read_mem() <<if (p != *ppos)>> return
> -EFBIG (as done in write_mem())?
I think that check implies you don't want to read any more memory,
right? Try changing it and see what happens :)
> 2) There is a note in memory_lseek() that states the return value
> to be (0) for negative addresses, however I cannot see how that
> would happen in the current implementation...
How that you could have a negative address, or how you would return 0?
Also, you should cc: the mm developers, they touch this file all the
time and know it quite well (recent changes to /dev/zero just got added
in the past few days from them.)
thanks,
greg k-h
Powered by blists - more mailing lists