Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752483AbdLLCzl (ORCPT ); Mon, 11 Dec 2017 21:55:41 -0500 Received: from cmccmta3.chinamobile.com ([221.176.66.81]:48484 "EHLO cmccmta3.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752410AbdLLCzh (ORCPT ); Mon, 11 Dec 2017 21:55:37 -0500 X-RM-TRANSID: 2eeb5a2f45266a4-e03d2 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2eea5a2f451baf7-7364f From: Yaowei Bai To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, baiyaowei@cmss.chinamobile.com Subject: [PATCH 8/8] crash_dump: is_kdump_kernel can be boolean Date: Mon, 11 Dec 2017 21:55:19 -0500 Message-Id: <1513047319-22302-9-git-send-email-baiyaowei@cmss.chinamobile.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1513047319-22302-1-git-send-email-baiyaowei@cmss.chinamobile.com> References: <1513047319-22302-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