Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2495461pxb; Fri, 29 Oct 2021 02:34:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1LgoAQKTTlblHaCjQRFRhhA6xdvbG+fM4FAf/FPCpS92zbRD1UK1HGSVE5dugHgiNLm8P X-Received: by 2002:a63:6888:: with SMTP id d130mr7362101pgc.234.1635500047496; Fri, 29 Oct 2021 02:34:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635500047; cv=none; d=google.com; s=arc-20160816; b=YJ4nGko/rsqmVFax37WoFpb+YhlZXksv1BHbdECD8FNu4oj3akLaN4D1H0UHh0basD vvQBONCLJUsNgYrmKZICQlHauuMbtso+ja8A9yoPOwu4zN0bvVVGp5pNLlPB7EO1EzPB ogSUpEcTKUeQckMXG7pFXohM3WwZbTngdzUs7d+1FsBt+EWu0itkPFpKpQc55tY4mzQU eyELq5a52Q856AGGpExAYjOqIIrE4QwG6wpdc5nW1wW+MkRsjhjvQ1VLCMR9P7rxqCqq 5mLV4LjsO2lC91kIDKtrwMKMaErZ7sjVh5eGUJAaIblnLiHnftVhaSRIWaNwACcZzXNL a+5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=7tfeb0HKytIhVqT5P55ARF+KxzdK/QUGLHX6976FgLg=; b=MDcvsjgItXgTWbwpN44WJdtS8I4JXRZfBhfoG10nnLv9OGiuahpbEYrVGmNazyklTu mjTIuwEHPI6QXk1zKoGhXvRBdola9wYN74wDCVcmLMJSxEOaF/viG2L3xxkybR6+4AUk i/nau1eK9P1KpmJEx4v0uNE+3ppjJdt+hY9dqG3mRf+M2nhCGSIQPBYYy1jsOLoOK5FL 0Mv0mN9VE1/VL/K1ilC0yF3ry0yzUi/pK5EAdTm+Y2ZIZ/BpmfNznMsj5vU1ZvjVcV37 UpsMuL7e/byMb0/ZfhNit/mBnSpIKgYU673ZybMHh79sWjE1GJtrKLFj11DAei30aDUh nZhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=S1ElMer5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k4si8051148plk.419.2021.10.29.02.33.54; Fri, 29 Oct 2021 02:34:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=S1ElMer5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231473AbhJ2Jf3 (ORCPT + 99 others); Fri, 29 Oct 2021 05:35:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:23258 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229927AbhJ2Jf3 (ORCPT ); Fri, 29 Oct 2021 05:35:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635499980; 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=7tfeb0HKytIhVqT5P55ARF+KxzdK/QUGLHX6976FgLg=; b=S1ElMer5iaJmiwcP+xqlteirYY8o5nkF+OKvCxmGzzBqd5+cGefvL2QCe3L4idrnt5h3Dk LZNZlXRMxjGy1TCL0gZtrOSzEYUTZtJsi+OpWKIO9GMPlKzjk+4a+oRo3aZLZXYD23679j x+lkZA90p8K/Qm+XIlFNdjgoVYqywG4= 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-4-J4k8dgW0NIG_oTE6dTRRnw-1; Fri, 29 Oct 2021 05:31:22 -0400 X-MC-Unique: J4k8dgW0NIG_oTE6dTRRnw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F04421023F4D; Fri, 29 Oct 2021 09:31:20 +0000 (UTC) Received: from localhost (ovpn-12-171.pek2.redhat.com [10.72.12.171]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E7AC21815D; Fri, 29 Oct 2021 09:31:09 +0000 (UTC) Date: Fri, 29 Oct 2021 17:31:07 +0800 From: Baoquan He To: cgel.zte@gmail.com Cc: dyoung@redhat.com, vgoyal@redhat.com, kexec@lists.infradead.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, Changcheng Deng , Zeal Robot Subject: Re: [PATCH] crash_dump: fix boolreturn.cocci warning Message-ID: <20211029093107.GK27625@MiWiFi-R3L-srv> References: <20211020083905.1037952-1-deng.changcheng@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211020083905.1037952-1-deng.changcheng@zte.com.cn> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/20/21 at 08:39am, cgel.zte@gmail.com wrote: > From: Changcheng Deng > > ./include/linux/crash_dump.h: 119: 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. > > Reported-by: Zeal Robot > Signed-off-by: Changcheng Deng Looks good to me, thanks. Acked-by: Baoquan He > --- > 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 0c547d866f1e..979c26176c1d 100644 > --- a/include/linux/crash_dump.h > +++ b/include/linux/crash_dump.h > @@ -116,7 +116,7 @@ extern void register_vmcore_cb(struct vmcore_cb *cb); > extern void unregister_vmcore_cb(struct vmcore_cb *cb); > > #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 */ > -- > 2.25.1 >