]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mm/damon/core: nullify pointer ctx->kdamond with a NULL
authorColin Ian King <colin.king@canonical.com>
Fri, 5 Nov 2021 20:46:15 +0000 (13:46 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Nov 2021 20:30:44 +0000 (13:30 -0700)
Currently a plain integer is being used to nullify the pointer
ctx->kdamond.  Use NULL instead.  Cleans up sparse warning:

  mm/damon/core.c:317:40: warning: Using plain integer as NULL pointer

Link: https://lkml.kernel.org/r/20210925215908.181226-1-colin.king@canonical.com
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/damon/core.c

index 8171e7dddc309942491ac3d9d5eefa234975b6ed..d993db50280cb371c50a55771ac96e6dc92b0253 100644 (file)
@@ -314,7 +314,7 @@ static int __damon_start(struct damon_ctx *ctx)
                                nr_running_ctxs);
                if (IS_ERR(ctx->kdamond)) {
                        err = PTR_ERR(ctx->kdamond);
-                       ctx->kdamond = 0;
+                       ctx->kdamond = NULL;
                }
        }
        mutex_unlock(&ctx->kdamond_lock);