Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753475AbdLNPuy (ORCPT ); Thu, 14 Dec 2017 10:50:54 -0500 Received: from cmccmta1.chinamobile.com ([221.176.66.79]:2164 "EHLO cmccmta1.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753264AbdLNPuv (ORCPT ); Thu, 14 Dec 2017 10:50:51 -0500 X-RM-TRANSID: 2ee35a329dcf1b2-26f72 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee75a329dc83f4-76ee0 From: Yaowei Bai To: akpm@linux-foundation.org, rdunlap@infradead.org, rientjes@google.com, joe@perches.com Cc: linux-kernel@vger.kernel.org, baiyaowei@cmss.chinamobile.com Subject: [PATCH 7/7] crash_dump: is_kdump_kernel can be boolean Date: Thu, 14 Dec 2017 10:50:22 -0500 Message-Id: <1513266622-15860-8-git-send-email-baiyaowei@cmss.chinamobile.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1513266622-15860-1-git-send-email-baiyaowei@cmss.chinamobile.com> References: <1513266622-15860-1-git-send-email-baiyaowei@cmss.chinamobile.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1513 Lines: 45 This patch makes is_kdump_kernel return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai --- include/linux/crash_dump.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h index a992e6c..8b0c711 100644 --- a/include/linux/crash_dump.h +++ b/include/linux/crash_dump.h @@ -52,13 +52,13 @@ extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, * has passed the elf core header address on command line. * * This is not just a test if CONFIG_CRASH_DUMP is enabled or not. It will - * return 1 if CONFIG_CRASH_DUMP=y and if kernel is booting after a panic of - * previous kernel. + * return true if CONFIG_CRASH_DUMP=y and if kernel is booting after a panic + * of previous kernel. */ -static inline int is_kdump_kernel(void) +static inline bool is_kdump_kernel(void) { - return (elfcorehdr_addr != ELFCORE_ADDR_MAX) ? 1 : 0; + return elfcorehdr_addr != ELFCORE_ADDR_MAX; } /* is_vmcore_usable() checks if the kernel is booting after a panic and @@ -89,7 +89,7 @@ static inline void vmcore_unusable(void) extern void unregister_oldmem_pfn_is_ram(void); #else /* !CONFIG_CRASH_DUMP */ -static inline int is_kdump_kernel(void) { return 0; } +static inline bool is_kdump_kernel(void) { return false; } #endif /* CONFIG_CRASH_DUMP */ extern unsigned long saved_max_pfn; -- 1.8.3.1