[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.00.0803132149320.11864@localhost.localdomain>
Date: Thu, 13 Mar 2008 21:53:01 -0400 (EDT)
From: "Robert P. J. Day" <rpjday@...shcourse.ca>
To: Jan Engelhardt <jengelh@...putergmbh.de>
cc: Jesper Juhl <jesper.juhl@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: whose job is it to include various header files?
On Fri, 14 Mar 2008, Jan Engelhardt wrote:
>
> On Mar 14 2008 00:53, Jesper Juhl wrote:
> >I agree with you completely. A file should explicitly include
> >headers for the stuff it uses and not rely on implicit includes
> >done elsewhere. Cleaning that up is going to touch a lot of files
> >though for no real short term gain (there is a long term gain of
> >maintainability though), so it's going to be a loveless job :(
>
> But straightforward. You nuke the complete #include list of a .h/.c
> file and "rebuild" it by hand, by looking at the code the .h/.c file
> provides/uses and selecting appropriate #includes.
well, yes, that would certainly do it, but i'm not that ambitious.
:-) actually, what i'm testing now is deleting the two superfluous
includes from <linux/percpu.h>:
#include <linus/slab.h>
#include <linux/string.h>
doing "make allyesconfig" on x86, watching where the compile fails,
fixing that file, and noticing that errors fall into a fairly small
set of localized clumps, so i'll just collect them and submit them.
there's actually not that many. patches to follow shortly.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.
http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists