[PATCH 1/4] drm: fix headers to include linux/types.h

Alexander Shishkin virtuoso at slind.org
Wed Dec 1 09:37:20 PST 2010

On Wed, Dec 01, 2010 at 05:54:18PM +0100, Julien Cristau wrote:
> On Wed, Dec  1, 2010 at 17:10:42 +0200, Alexander Shishkin wrote:
> > For headers that get exported to userland and make use of u32 style
> > type names, it is advised to include linux/types.h.
> > 
> > This fixes 5 headers_check warnings.
> > 
> How many times does this need to be NAKed?  These headers are shared
> with the BSDs, and they include drm.h which has the linux/types.h
> include on linux already.

One of the rules of including files that comes to mind is that one should
never rely on stuff being included from other headers but always explicitly
include those which are needed.
But if compatibility with other OS kernels is a valid reason to disregard
common coding practices, maybe at least it deserves a comment in those files?

But I really couldn't care less about these headers, so this is totally up
to you.


More information about the dri-devel mailing list