Re: [patch -mm 4/4] mempolicy: remove includes for duplicate headers

Andrew Morton
2008-03-07T08:46:24Z

On Thu, 6 Mar 2008 15:01:48 -0600 Paul Jackson <pj@sgi.com> wrote:

> David wrote:
> > It simply decreases the remote chance later that ...
> >
> > The only way this would make things more fragile is if ...
>
> Does anyone lurking on this thread know if there is an
> established convention in kernel code, whether to directly
> include all headers that your code explicitly needs, or
> whether it's ok to rely on indirect includes for such?
>
> David and I could debate the fine points of which way is
> best until the cows come home; the two of us are good at
> that. This is too minor an issue for that sort of effort.
>

Directly including what you need is more robust than a) relying upon nested
inclusions by includees or b) relying upon preceding inclusions by
includers.

So we usually go that way, when we notice it and when we think about it.