From patchwork Thu Sep 2 21:53:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12472767 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF5BDC4167B for ; Thu, 2 Sep 2021 21:53:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A0CCF61139 for ; Thu, 2 Sep 2021 21:53:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A0CCF61139 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 45C5A6B0072; Thu, 2 Sep 2021 17:53:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3E5B16B00AA; Thu, 2 Sep 2021 17:53:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2AC708D0001; Thu, 2 Sep 2021 17:53:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0138.hostedemail.com [216.40.44.138]) by kanga.kvack.org (Postfix) with ESMTP id 1A6926B0072 for ; Thu, 2 Sep 2021 17:53:32 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D22282C6AE for ; Thu, 2 Sep 2021 21:53:31 +0000 (UTC) X-FDA: 78543985422.03.1FFC6AB Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf04.hostedemail.com (Postfix) with ESMTP id 9416350000A4 for ; Thu, 2 Sep 2021 21:53:31 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 9EC5161131; Thu, 2 Sep 2021 21:53:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1630619610; bh=X+0A3zsWQ/RN97aNv+p5ZQywVWKd6gnItaDkChWUHM8=; h=Date:From:To:Subject:In-Reply-To:From; b=fDM+ql6WZCwgggLw2hQwpQlBoqBGEEaoAeVRREGHMQztjBDqi7CsLXI31dEuWbJYF mcv71H3LHo6+P+JSt85ERVI7kt8pXZxohvKDzJLAoMots2+L62l7tG7F/sEdtDipLe NDufW6Zb1DvbHUKcEL2f2cp2GaMhKvP1Aj4GdWqQ= Date: Thu, 02 Sep 2021 14:53:30 -0700 From: Andrew Morton To: akpm@linux-foundation.org, jing.yangyang@zte.com.cn, linux-mm@kvack.org, mm-commits@vger.kernel.org, torvalds@linux-foundation.org, zealci@zte.com.cn Subject: [patch 067/212] include/linux/buffer_head.h: fix boolreturn.cocci warnings Message-ID: <20210902215330.oatfcoF1d%akpm@linux-foundation.org> In-Reply-To: <20210902144820.78957dff93d7bea620d55a89@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=fDM+ql6W; dmarc=none; spf=pass (imf04.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 9416350000A4 X-Stat-Signature: sgcw8cd1xr1j64jqu4skic8u7kdsgnsf X-HE-Tag: 1630619611-844342 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: Jing Yangyang Subject: include/linux/buffer_head.h: fix boolreturn.cocci warnings ./include/linux/buffer_head.h:412:64-65:WARNING:return of 0/1 in function 'has_bh_in_lru' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci Link: https://lkml.kernel.org/r/20210824055828.58783-1-deng.changcheng@zte.com.cn Signed-off-by: Jing Yangyang Reported-by: Zeal Robot Signed-off-by: Andrew Morton --- include/linux/buffer_head.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/buffer_head.h~include-buffer_head-fix-boolreturncocci-warnings +++ a/include/linux/buffer_head.h @@ -409,7 +409,7 @@ static inline void invalidate_inode_buff static inline int remove_inode_buffers(struct inode *inode) { return 1; } static inline int sync_mapping_buffers(struct address_space *mapping) { return 0; } static inline void invalidate_bh_lrus_cpu(int cpu) {} -static inline bool has_bh_in_lru(int cpu, void *dummy) { return 0; } +static inline bool has_bh_in_lru(int cpu, void *dummy) { return false; } #define buffer_heads_over_limit 0 #endif /* CONFIG_BLOCK */