Re: [PATCH v3 1/1] nvmem: Change return type of reg read/write to ssize_t

From: Greg Kroah-Hartman
Date: Tue Jun 04 2024 - 11:42:53 EST


On Fri, May 10, 2024 at 08:29:29AM +0000, Joy Chakraborty wrote:
> Change return type of reg_read() and reg_write() callback to ssize_t for
> nvmem suppliers to return number of bytes read/written to the nvmem core.
>
> Currently nvmem core assumes the amount of data read/written is equal
> to what it has requested from the supplier, this return code facilitates
> better error handling in the nvmem core.
>
> Signed-off-by: Joy Chakraborty <joychakr@xxxxxxxxxx>

I thought this would be two patches, one to change the return type, and
the second to change the logic involved here (making it easier to notice
the logic changes.) But it seems ok to me:

Reviewed-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>