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=-16.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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 941E6C432BE for ; Fri, 27 Aug 2021 03:08:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 79D9460FC0 for ; Fri, 27 Aug 2021 03:08:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244115AbhH0DJ3 (ORCPT ); Thu, 26 Aug 2021 23:09:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:43028 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244015AbhH0DJ1 (ORCPT ); Thu, 26 Aug 2021 23:09:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630033718; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Jt5razDxzrUFLRcM3odlUk0Cdz2K7FM0bCsCoHsZlGc=; b=EhyqJmVuuhcR2rA0QmxtyZ+snOxvwsVs6QCHFTvqhjd6UxITVEbQ6B9CFzrfwS6RtfsT/V AN4ZZZICN9Jnkdfv/Z51F+GPA7HiEukzGJ9C4bQyofOadvUOoOUC61EbuN1f7bhebK8ylp 4BH+PArt9bYl2niiau0ScXWQaE8Vsn4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-44-w14oheYfO_eAh8Gjfmdn-g-1; Thu, 26 Aug 2021 23:08:37 -0400 X-MC-Unique: w14oheYfO_eAh8Gjfmdn-g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4370A1082921; Fri, 27 Aug 2021 03:08:36 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-13-14.pek2.redhat.com [10.72.13.14]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 060CF3AC1; Fri, 27 Aug 2021 03:08:32 +0000 (UTC) Date: Fri, 27 Aug 2021 11:08:29 +0800 From: Dave Young To: CGEL Cc: Baoquan He , Vivek Goyal , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Jing Yangyang , Zeal Robot Subject: Re: [PATCH linux-next] include:crash_dump: fix boolreturn.cocci warnings Message-ID: References: <20210824060125.58876-1-deng.changcheng@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210824060125.58876-1-deng.changcheng@zte.com.cn> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/23/21 at 11:01pm, CGEL wrote: > From: Jing Yangyang > > ./include/linux/crash_dump.h:98:50-51:WARNING: return of 0/1 in > function 'is_kdump_kernel' 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 > > Reported-by: Zeal Robot > Signed-off-by: Jing Yangyang > --- > include/linux/crash_dump.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h > index a5192b7..f92ebfe 100644 > --- a/include/linux/crash_dump.h > +++ b/include/linux/crash_dump.h > @@ -95,7 +95,7 @@ static inline void vmcore_unusable(void) > extern void unregister_oldmem_pfn_is_ram(void); > > #else /* !CONFIG_CRASH_DUMP */ > -static inline bool is_kdump_kernel(void) { return 0; } > +static inline bool is_kdump_kernel(void) { return false; } > #endif /* CONFIG_CRASH_DUMP */ > > /* Device Dump information to be filled by drivers */ > -- > 1.8.3.1 > > Acked-by: Dave Young Thanks Dave