Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753133AbbKQDTZ (ORCPT ); Mon, 16 Nov 2015 22:19:25 -0500 Received: from cmccmta1.chinamobile.com ([221.176.66.79]:4356 "EHLO cmccmta1.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753062AbbKQDTW (ORCPT ); Mon, 16 Nov 2015 22:19:22 -0500 X-RM-TRANSID: 2ee4564a9cb4b1a-63570 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee1564a9cb2201-f1730 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 1/2] init/main.c: obsolete_checksetup can be boolean Date: Tue, 17 Nov 2015 11:18:55 +0800 Message-Id: <1447730336-7443-1-git-send-email-baiyaowei@cmss.chinamobile.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1548 Lines: 55 This patch makes obsolete_checksetup 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/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/init/main.c b/init/main.c index 9e64d70..23449b7 100644 --- a/init/main.c +++ b/init/main.c @@ -164,10 +164,10 @@ static const char *panic_later, *panic_param; extern const struct obs_kernel_param __setup_start[], __setup_end[]; -static int __init obsolete_checksetup(char *line) +static bool __init obsolete_checksetup(char *line) { const struct obs_kernel_param *p; - int had_early_param = 0; + bool had_early_param = false; p = __setup_start; do { @@ -179,13 +179,13 @@ static int __init obsolete_checksetup(char *line) * Keep iterating, as we can have early * params and __setups of same names 8( */ if (line[n] == '\0' || line[n] == '=') - had_early_param = 1; + had_early_param = true; } else if (!p->setup_func) { pr_warn("Parameter %s is obsolete, ignored\n", p->str); - return 1; + return true; } else if (p->setup_func(line + n)) - return 1; + return true; } p++; } while (p < __setup_end); -- 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/