From patchwork Fri Nov 5 20:46:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12605843 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 618B9C433F5 for ; Fri, 5 Nov 2021 20:46:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 30C0061288 for ; Fri, 5 Nov 2021 20:46:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 30C0061288 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id BCFF49400D7; Fri, 5 Nov 2021 16:46:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B7EC19400C1; Fri, 5 Nov 2021 16:46:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A6E0C9400D7; Fri, 5 Nov 2021 16:46:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0003.hostedemail.com [216.40.44.3]) by kanga.kvack.org (Postfix) with ESMTP id 93F269400C1 for ; Fri, 5 Nov 2021 16:46:17 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 5A32076B46 for ; Fri, 5 Nov 2021 20:46:17 +0000 (UTC) X-FDA: 78776059194.24.E269FF4 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf31.hostedemail.com (Postfix) with ESMTP id A8D5A104AACB for ; Fri, 5 Nov 2021 20:46:08 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 348D261288; Fri, 5 Nov 2021 20:46:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1636145176; bh=zlvH2jY7naVEqZ/kfzMKr2KBE+X/tSwBozn9f+5T/R0=; h=Date:From:To:Subject:In-Reply-To:From; b=wLTEs5XeCgXNx5pzdy5f6hxbKsDlP9iO698eXSHWF7TKFGe1HgsfoF83+vJSqwyqX GMzrgCnDIHLSu4Txd+JrAnOCFgzCtgO/P3nefiSJviIZoC0HgHDOcmmYIzQmX/nSMK Rxf+o3+JstepaeO//p/8yFWWf84eszINy3NP5qm8= Date: Fri, 05 Nov 2021 13:46:15 -0700 From: Andrew Morton To: akpm@linux-foundation.org, colin.king@canonical.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, sj@kernel.org, torvalds@linux-foundation.org Subject: [patch 222/262] mm/damon/core: nullify pointer ctx->kdamond with a NULL Message-ID: <20211105204615.IkBgRaxHP%akpm@linux-foundation.org> In-Reply-To: <20211105133408.cccbb98b71a77d5e8430aba1@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: A8D5A104AACB X-Stat-Signature: 7ueb996fhmfr38o8e9kse3gct16u9eh4 Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=wLTEs5Xe; dmarc=none; spf=pass (imf31.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-HE-Tag: 1636145168-113541 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 Subject: mm/damon/core: nullify pointer ctx->kdamond with a NULL 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 Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton --- mm/damon/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/damon/core.c~mm-damon-core-nullify-pointer-ctx-kdamond-with-a-null +++ a/mm/damon/core.c @@ -314,7 +314,7 @@ static int __damon_start(struct damon_ct nr_running_ctxs); if (IS_ERR(ctx->kdamond)) { err = PTR_ERR(ctx->kdamond); - ctx->kdamond = 0; + ctx->kdamond = NULL; } } mutex_unlock(&ctx->kdamond_lock);