Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933858AbZJGAhs (ORCPT ); Tue, 6 Oct 2009 20:37:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933730AbZJGAhs (ORCPT ); Tue, 6 Oct 2009 20:37:48 -0400 Received: from exprod6ob109.obsmtp.com ([64.18.1.22]:42748 "HELO psmtp.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with SMTP id S933327AbZJGAhr convert rfc822-to-8bit (ORCPT ); Tue, 6 Oct 2009 20:37:47 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Subject: [PATCH] init/main.c: fix symbol shadows noise Date: Tue, 6 Oct 2009 20:37:17 -0400 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] init/main.c: fix symbol shadows noise Thread-Index: AcpG5lJOjLw5nPN2Q/q6+Zc0hOxpvA== From: "H Hartley Sweeten" To: X-OriginalArrivalTime: 07 Oct 2009 00:37:10.0197 (UTC) FILETIME=[4E348E50:01CA46E6] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1908 Lines: 63 The symbol 'call' is a static symbol used for initcall_debug. This same symbol name is used locally by a couple functions and produces the following sparse warnings: warning: symbol 'call' shadows an earlier one Fix this noise by renaming the local symbols. Signed-off-by: H Hartley Sweeten --- diff --git a/init/main.c b/init/main.c index 7449819..19e564a 100644 --- a/init/main.c +++ b/init/main.c @@ -696,10 +696,10 @@ asmlinkage void __init start_kernel(void) static void __init do_ctors(void) { #ifdef CONFIG_CONSTRUCTORS - ctor_fn_t *call = (ctor_fn_t *) __ctors_start; + ctor_fn_t *fn = (ctor_fn_t *) __ctors_start; - for (; call < (ctor_fn_t *) __ctors_end; call++) - (*call)(); + for (; fn < (ctor_fn_t *) __ctors_end; fn++) + (*fn)(); #endif } @@ -760,10 +760,10 @@ extern initcall_t __initcall_start[], __initcall_end[], __early_initcall_end[]; static void __init do_initcalls(void) { - initcall_t *call; + initcall_t *fn; - for (call = __early_initcall_end; call < __initcall_end; call++) - do_one_initcall(*call); + for (fn = __early_initcall_end; fn < __initcall_end; fn++) + do_one_initcall(*fn); /* Make sure there is no pending stuff from the initcall sequence */ flush_scheduled_work(); @@ -791,10 +791,10 @@ static void __init do_basic_setup(void) static void __init do_pre_smp_initcalls(void) { - initcall_t *call; + initcall_t *fn; - for (call = __initcall_start; call < __early_initcall_end; call++) - do_one_initcall(*call); + for (fn = __initcall_start; fn < __early_initcall_end; fn++) + do_one_initcall(*fn); } static void run_init_process(char *init_filename) -- 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/