Re: [PATCH v2] mm/damon/sysfs: return 'err' value when call kstrtoul() failed

From: SeongJae Park
Date: Tue Sep 20 2022 - 12:33:13 EST


Hi Xin,

On Tue, 20 Sep 2022 10:51:58 +0800 Xin Hao <xhao@xxxxxxxxxxxxxxxxx> wrote:

> We had better return the 'err' value when calling kstrtoul() failed, so
> the user will know why it really fails, there do little change, let it
> return the 'err' value when failed.
>
> Suggested-by: SeongJae Park <sj@xxxxxxxxxx>
> Signed-off-by: Xin Hao <xhao@xxxxxxxxxxxxxxxxx>

Looks good to me overall, but...

> Changes from v1
> https://lore.kernel.org/linux-mm/20220919170305.61335-1-sj@xxxxxxxxxx/T/
> - keep the 'err' variable, and return the 'err' value when failed.

Patch changelog shouldn't be here as a part of the commit message,

> ---

But here.

Other than that,

Reviewed-by: SeongJae Park <sj@xxxxxxxxxx>

I will revise and post it on behalf of Xin, for reducing unnecessary Andrew's
burden.


Thanks,
SJ

[...]