[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220507153833.45600-1-sj@kernel.org>
Date: Sat, 7 May 2022 15:38:33 +0000
From: SeongJae Park <sj@...nel.org>
To: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Cc: sj@...nel.org, akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Abaci Robot <abaci@...ux.alibaba.com>, damon@...ts.linux.dev
Subject: Re: [PATCH] mm/damon/reclaim: Use resource_size function on resource object
Hi Jiapeng,
Thank you for this patch!
On Sat, 7 May 2022 11:25:12 +0800 Jiapeng Chong <jiapeng.chong@...ux.alibaba.com> wrote:
> Fix the following coccicheck warnings:
>
> ./mm/damon/reclaim.c:241:30-33: WARNING: Suspicious code. resource_size
> is maybe missing with res.
Nit. I'd prefer having this kind of program outputs in commit message be
indented and not broken, like below:
./mm/damon/reclaim.c:241:30-33: WARNING: Suspicious code. resource_size is maybe missing with res.
>
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Other than the nit,
Reviewed-by: SeongJae Park <sj@...nel.org>
Thanks,
SJ
> ---
> mm/damon/reclaim.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/damon/reclaim.c b/mm/damon/reclaim.c
> index f37c5d4b27fa..8efbfb24f3a1 100644
> --- a/mm/damon/reclaim.c
> +++ b/mm/damon/reclaim.c
> @@ -238,7 +238,7 @@ static int walk_system_ram(struct resource *res, void *arg)
> {
> struct damon_reclaim_ram_walk_arg *a = arg;
>
> - if (a->end - a->start < res->end - res->start) {
> + if (a->end - a->start < resource_size(res)) {
> a->start = res->start;
> a->end = res->end;
> }
> --
> 2.20.1.7.g153144c
Powered by blists - more mailing lists