From mboxrd@z Thu Jan 1 00:00:00 1970 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=unavailable 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 B7FDDC433F5 for ; Thu, 2 Sep 2021 21:53:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A2266610CE for ; Thu, 2 Sep 2021 21:53:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347807AbhIBVyq (ORCPT ); Thu, 2 Sep 2021 17:54:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:48288 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347761AbhIBVya (ORCPT ); Thu, 2 Sep 2021 17:54:30 -0400 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 Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org 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 */ _