Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932710AbWHJTj1 (ORCPT ); Thu, 10 Aug 2006 15:39:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932690AbWHJTi2 (ORCPT ); Thu, 10 Aug 2006 15:38:28 -0400 Received: from cantor.suse.de ([195.135.220.2]:39313 "EHLO mx1.suse.de") by vger.kernel.org with ESMTP id S932688AbWHJThk (ORCPT ); Thu, 10 Aug 2006 15:37:40 -0400 From: Andi Kleen References: <20060810 935.775038000@suse.de> In-Reply-To: <20060810 935.775038000@suse.de> Subject: [PATCH for review] [130/145] i386: clean up topology.c Message-Id: <20060810193729.EC90B13C0B@wotan.suse.de> Date: Thu, 10 Aug 2006 21:37:29 +0200 (CEST) To: undisclosed-recipients:; Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1545 Lines: 68 r From: Magnus Damm There is no need to duplicate the topology_init() function. Signed-off-by: Magnus Damm Signed-off-by: Andi Kleen --- arch/i386/kernel/topology.c | 21 +++------------------ 1 files changed, 3 insertions(+), 18 deletions(-) Index: linux/arch/i386/kernel/topology.c =================================================================== --- linux.orig/arch/i386/kernel/topology.c +++ linux/arch/i386/kernel/topology.c @@ -28,6 +28,7 @@ #include #include #include +#include #include static struct i386_cpu cpu_devices[NR_CPUS]; @@ -55,34 +56,18 @@ EXPORT_SYMBOL(arch_register_cpu); EXPORT_SYMBOL(arch_unregister_cpu); #endif /*CONFIG_HOTPLUG_CPU*/ - - -#ifdef CONFIG_NUMA -#include - static int __init topology_init(void) { int i; +#ifdef CONFIG_NUMA for_each_online_node(i) register_one_node(i); +#endif /* CONFIG_NUMA */ for_each_present_cpu(i) arch_register_cpu(i); return 0; } -#else /* !CONFIG_NUMA */ - -static int __init topology_init(void) -{ - int i; - - for_each_present_cpu(i) - arch_register_cpu(i); - return 0; -} - -#endif /* CONFIG_NUMA */ - subsys_initcall(topology_init); - 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/