Re: [2.5 patch] hdreg.h must include types.h
Frank Schaefer (frank.schafer@setuza.cz)
09 Apr 2002 09:37:32 +0200
On Thu, 2002-04-04 at 16:50, Adrian Bunk wrote:
> On Thu, 4 Apr 2002, Martin Dalecki wrote:
>
> > The proper fix is to add linux/types.h in ide-pnp.c in front
> > of linux/hdreg.h inclusion. Nested includes are *nasty*.
>
> Why are they nasty? My impression is that they give you a cleaner API in
> the sense that you know that when you need something from e.g.
> linux/hdreg.h you can simply include this file without bothering which
> other header files are needed by this file. The only problem I'm currently
> seeing is that circular dependencies between header files might be a
> problem but it shouldn't be too hard to check that there are no circular
> dependencies. Are there any other problems I don't see?
>
Agree,
and assuming that every header begins with sonething like
#ifndef HEADER_INCLUDED
we save a lot of typing and error prone-ness.
Frank
-
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/