Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753107AbbKQDTY (ORCPT ); Mon, 16 Nov 2015 22:19:24 -0500 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:2388 "EHLO cmccmta2.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751646AbbKQDTV (ORCPT ); Mon, 16 Nov 2015 22:19:21 -0500 X-RM-TRANSID: 2ee8564a9cb5546-6cc00 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee1564a9cb2201-f1733 From: Yaowei Bai To: akpm@linux-foundation.org, paulmck@linux.vnet.ibm.com, bobby.prani@gmail.com, dhowells@redhat.com, mhocko@suse.cz, hannes@cmpxchg.org, David.Woodhouse@intel.com Cc: linux-kernel@vger.kernel.org Subject: [PATCH 2/2] init/do_mounts: initrd_load can be boolean Date: Tue, 17 Nov 2015 11:18:56 +0800 Message-Id: <1447730336-7443-2-git-send-email-baiyaowei@cmss.chinamobile.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1447730336-7443-1-git-send-email-baiyaowei@cmss.chinamobile.com> References: <1447730336-7443-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: 1636 Lines: 64 This patch makes initrd_load 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 --- init/do_mounts.h | 4 ++-- init/do_mounts_initrd.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/init/do_mounts.h b/init/do_mounts.h index f5b978a..067af1d 100644 --- a/init/do_mounts.h +++ b/init/do_mounts.h @@ -57,11 +57,11 @@ static inline int rd_load_image(char *from) { return 0; } #ifdef CONFIG_BLK_DEV_INITRD -int __init initrd_load(void); +bool __init initrd_load(void); #else -static inline int initrd_load(void) { return 0; } +static inline bool initrd_load(void) { return false; } #endif diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index 3e0878e..a1000ca 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c @@ -116,7 +116,7 @@ static void __init handle_initrd(void) } } -int __init initrd_load(void) +bool __init initrd_load(void) { if (mount_initrd) { create_dev("/dev/ram", Root_RAM0); @@ -129,9 +129,9 @@ int __init initrd_load(void) if (rd_load_image("/initrd.image") && ROOT_DEV != Root_RAM0) { sys_unlink("/initrd.image"); handle_initrd(); - return 1; + return true; } } sys_unlink("/initrd.image"); - return 0; + return false; } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/