From patchwork Sat Sep 25 21:59:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 12517815 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F2E9C433EF for ; Sat, 25 Sep 2021 21:59:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 86DD860F5D for ; Sat, 25 Sep 2021 21:59:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 86DD860F5D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 85698900002; Sat, 25 Sep 2021 17:59:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 805E76B0072; Sat, 25 Sep 2021 17:59:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6A690900002; Sat, 25 Sep 2021 17:59:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0212.hostedemail.com [216.40.44.212]) by kanga.kvack.org (Postfix) with ESMTP id 5A2806B0071 for ; Sat, 25 Sep 2021 17:59:11 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id E5DD718037BDC for ; Sat, 25 Sep 2021 21:59:10 +0000 (UTC) X-FDA: 78627462060.18.B117499 Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) by imf20.hostedemail.com (Postfix) with ESMTP id 7860CD0000AB for ; Sat, 25 Sep 2021 21:59:10 +0000 (UTC) Received: from localhost (1.general.cking.uk.vpn [10.172.193.212]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 91AA23F070; Sat, 25 Sep 2021 21:59:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1632607148; bh=X8bcr5IsgetMjo+uz2jNmTIyMflSWfgaoOmzS2irH7U=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=eXvfkiyt68V4JBa92l83AG/m0+VHiYqED7qIiVcRX4a+zW74yufVRCqzMVFP/CjyG CSyuwHwLvJbXxN7r0HrWYg8ZYp9vlmysFcgBaBG78LN9pNr+Pmkrqtm7xjYKwUSi0D VlZ7q5vfUUIeIuN4tfCuzKeuEix6JFbeOs2m+4Z6HfJsWO+aksRtp5hlh6MQCM5l09 0fvkBhyG/6Vo3wOvUJgPM5UtXk+kLEPR4FlDhVf7bBwDe6SyR81VgkieKzvrVIZqWf 8cT50xiIJMMSeLDBwE6zzwgve6OW+bVeGWX1QJRaf8riIVAKmlmwXO/mOuMc5P0pD+ GOXMaK9jENseQ== From: Colin King To: SeongJae Park , Andrew Morton , linux-mm@kvack.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm/damon/core: nullify pointer ctx->kdamond with a NULL Date: Sat, 25 Sep 2021 22:59:08 +0100 Message-Id: <20210925215908.181226-1-colin.king@canonical.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=canonical.com header.s=20210705 header.b=eXvfkiyt; spf=pass (imf20.hostedemail.com: domain of colin.king@canonical.com designates 185.125.188.121 as permitted sender) smtp.mailfrom=colin.king@canonical.com; dmarc=pass (policy=none) header.from=canonical.com X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 7860CD0000AB X-Stat-Signature: smt5httg9qe3mpqs4phg3x97m8kb7ixk X-HE-Tag: 1632607150-676111 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Colin Ian King 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 Signed-off-by: Colin Ian King Reviewed-by: SeongJae Park --- mm/damon/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/damon/core.c b/mm/damon/core.c index 874558a790a0..c8665c80577a 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -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);