Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756045AbYGVDTq (ORCPT ); Mon, 21 Jul 2008 23:19:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753768AbYGVDTi (ORCPT ); Mon, 21 Jul 2008 23:19:38 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:41614 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753277AbYGVDTh (ORCPT ); Mon, 21 Jul 2008 23:19:37 -0400 Subject: Re: [git pull] x86: declaration fixes From: Jaswinder Singh To: Ingo Molnar Cc: LKML In-Reply-To: <20080721180439.GA13720@elte.hu> References: <1216662432.28271.30.camel@jaswinder.satnam> <20080721180439.GA13720@elte.hu> Content-Type: text/plain; charset=utf8 Date: Tue, 22 Jul 2008 08:48:35 +0530 Message-Id: <1216696715.2823.9.camel@jaswinder.satnam> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1 (2.22.1-2.fc9) Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2205 Lines: 79 Hello Ingo, On Mon, 2008-07-21 at 20:04 +0200, Ingo Molnar wrote: > * Jaswinder Singh wrote: > > > Hello Ingo, > > > > 2. [PATCH] x86: process_32.c declare cpu_number before they get used > > why is cpu_number moved over from smp.h to current.h? I think it's more > logical in smp.h. If it's missing somewhere then add an #include > to that file? > Because cpu_number is used by everyone independent of smp. In smp.h It was declared under #ifdef CONFIG_X86_32_SMP which was wrong. > also, this change: > > +++ b/include/linux/timer.h > @@ -6,6 +6,10 @@ > #include > #include > > +#ifdef CONFIG_X86 > +#include > +#endif /* CONFIG_X86 */ > > is not really acceptable in a generic header, nor is: > > --- a/include/linux/syscalls.h > +++ b/include/linux/syscalls.h > @@ -65,6 +67,10 @@ struct getcpu_cache; > #include > #include > > +#ifdef CONFIG_X86 > +#include > +#endif /* CONFIG_X86 */ > > i'd suggest we just do asm-x86/syscall.h and asm-x86/timer.h changes and > add #include and #include to the affected > x86 .c files. Once every architecture has it, linux/syscall.h can be > extended with an unconditional asm/syscall.h include. > Because checkpatch.pl raise objection for it. $ ./scripts/checkpatch.pl ../test.patch WARNING: Use #include instead of #9: FILE: arch/x86/kernel/time_32.c:40: +#include > +#ifdef CONFIG_X86_32 > extern int timer_ack; > -extern int no_timer_check; > extern int recalibrate_cpu_khz(void); > +#endif /* CONFIG_X86_32 */ > + > +extern int no_timer_check; > > hm, why was this needed? > Because timer_ack is only required for X86_32 and int recalibrate_cpu_khz(void) is declared inside #ifdef CONFIG_X86_32 in arch/x86/kernel/tsc.c Thank you, Jaswinder Singh. -- 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/