From patchwork Fri Jan 14 22:07:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12714106 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1EBAC433EF for ; Fri, 14 Jan 2022 22:07:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 386566B0121; Fri, 14 Jan 2022 17:07:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 335416B0123; Fri, 14 Jan 2022 17:07:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1FEC96B0124; Fri, 14 Jan 2022 17:07:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0062.hostedemail.com [216.40.44.62]) by kanga.kvack.org (Postfix) with ESMTP id 0D9576B0121 for ; Fri, 14 Jan 2022 17:07:24 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C1AE91826B6C5 for ; Fri, 14 Jan 2022 22:07:23 +0000 (UTC) X-FDA: 79030279566.30.BEA8A18 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf25.hostedemail.com (Postfix) with ESMTP id 5CA3EA0005 for ; Fri, 14 Jan 2022 22:07:23 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 88FCE6201D; Fri, 14 Jan 2022 22:07:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C02B3C36AEC; Fri, 14 Jan 2022 22:07:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1642198042; bh=7LuOOK14eXnlNYG8J9QodfnSLJlEQv7H2NUrOoEMzOg=; h=Date:From:To:Subject:In-Reply-To:From; b=1VTAfQ26b7Cf/+PEbx+koxZ9z1iHu7NVfozhK3Mavil4Z9dF3ykrt2QN4EXKsFfFn izn3v2SrAiCiWn0G7idmUCpQhb47utLlRIL6qcUDzQoVAqBvM5QHTBO/Hdh28D7WJI 2qZLM3KREM+WAiGe7SeUNXBzs8owD5IBEdvCDnpc= Date: Fri, 14 Jan 2022 14:07:21 -0800 From: Andrew Morton To: akpm@linux-foundation.org, deng.changcheng@zte.com.cn, linux-mm@kvack.org, mm-commits@vger.kernel.org, torvalds@linux-foundation.org, zealci@zte.com.cn Subject: [patch 080/146] mm: fix boolreturn.cocci warning Message-ID: <20220114220721.-NgiYC23R%akpm@linux-foundation.org> In-Reply-To: <20220114140222.6b14f0061194d3200000c52d@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 5CA3EA0005 X-Stat-Signature: ry3estu6595csomdj5fujyi9ojg8qius Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=1VTAfQ26; dmarc=none; spf=pass (imf25.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-HE-Tag: 1642198043-40461 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: Changcheng Deng Subject: mm: fix boolreturn.cocci warning Return statements in functions returning bool should use true/false instead of 1/0. Link: https://lkml.kernel.org/r/20211126073327.74815-1-deng.changcheng@zte.com.cn Signed-off-by: Changcheng Deng Reported-by: Zeal Robot Signed-off-by: Andrew Morton --- include/linux/page-flags.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/page-flags.h~mm-fix-boolreturncocci-warning +++ a/include/linux/page-flags.h @@ -383,7 +383,7 @@ static __always_inline int TestClearPage TESTCLEARFLAG(uname, lname, policy) #define TESTPAGEFLAG_FALSE(uname, lname) \ -static inline bool folio_test_##lname(const struct folio *folio) { return 0; } \ +static inline bool folio_test_##lname(const struct folio *folio) { return false; } \ static inline int Page##uname(const struct page *page) { return 0; } #define SETPAGEFLAG_NOOP(uname, lname) \