Re: [PATCH] nvmem: core: WARN_ONCE on nvmem reg_read/write() returning positive values
From: Dan Carpenter
Date: Thu Jul 25 2024 - 13:48:19 EST
On Thu, Jul 25, 2024 at 11:21:26AM +0000, Joy Chakraborty wrote:
> Nvmem core currently expects 0 to be returned on successful read/write
> and negative for failure from nvmem producers.
> Warn incase any nvmem producer returns positive values which might
> happen if any producer ends up returning the number of bytes read or
> written.
>
> Signed-off-by: Joy Chakraborty <joychakr@xxxxxxxxxx>
Thanks for fixing all these. I've double checked and I believe you did
catch them all. Plus if this patch triggers any warnings, then it will
be annoying but it's better to know about the bugs instead of running
into subtle issues down the road which is what the previous code did.
Reviewed-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
regards,
dan carpenter