Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765880AbZDHN4S (ORCPT ); Wed, 8 Apr 2009 09:56:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759877AbZDHN4B (ORCPT ); Wed, 8 Apr 2009 09:56:01 -0400 Received: from pfepb.post.tele.dk ([195.41.46.236]:38673 "EHLO pfepb.post.tele.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755046AbZDHN4A (ORCPT ); Wed, 8 Apr 2009 09:56:00 -0400 Date: Wed, 8 Apr 2009 15:58:03 +0200 From: Sam Ravnborg To: Ingo Molnar Cc: Huang Weiyi , mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/8] x86: remove dupilcated #include Message-ID: <20090408135803.GA21624@uranus.ravnborg.org> References: <1239009605-1796-1-git-send-email-weiyi.huang@gmail.com> <20090408122121.GB18581@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090408122121.GB18581@elte.hu> User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2571 Lines: 65 On Wed, Apr 08, 2009 at 02:21:21PM +0200, Ingo Molnar wrote: > > * Huang Weiyi wrote: > > > Remove dupilcated #include in arch/x86/kernel/dumpstack.c. > > > > Signed-off-by: Huang Weiyi > > --- > > arch/x86/kernel/dumpstack.c | 1 - > > 1 files changed, 0 insertions(+), 1 deletions(-) > > > > diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c > > index 95ea5fa..6d7966d 100644 > > --- a/arch/x86/kernel/dumpstack.c > > +++ b/arch/x86/kernel/dumpstack.c > > @@ -15,7 +15,6 @@ > > #include > > #include > > #include > > -#include > > > > #include > > Many of those include lines are probably unnecessary. Instead of > these trivial patches causing churn, would you be interested in > doing a comprehensive search to eliminate all the unused ones? > That would be a real step forward. (and this holds for your > other patches in this series too.) > > The include files section of fault.c might be a good template to > use: > > #include /* STACK_END_MAGIC */ > #include /* test_thread_flag(), ... */ > #include /* oops_begin/end, ... */ > #include /* search_exception_table */ > #include /* max_low_pfn */ > #include /* __kprobes, ... */ > #include /* kmmio_handler, ... */ > #include /* perf_swcounter_*(), ... */ > > #include /* dotraplinkage, ... */ > #include /* pgd_*(), ... */ > #include /* kmemcheck_*(), ... */ > > I was able to eliminate half of all include file lines there. I assume you are aware that when you minimize the # of include file in the various .c files, then you implicitly add dependency on the includes the individual .h files have. If we for example killed the include of from with this approach we would likely see random build failures. It is good to have it cleaned up but we should keep a critical eye on the header files we use. Sometimes these are the right target to clean up but as this is a bit more complicated or at least requires more build testing to do right. Sam -- 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/