Re: [PATCH] CodingStyle: add typedefs chapter

From: David Woodhouse
Date: Tue May 02 2006 - 14:50:52 EST


On Tue, 2006-05-02 at 11:41 -0700, Linus Torvalds wrote:
> The problem with uint32_t is that it's ugly, it used to be unportable, and
> you can't use it in header files _anyway_.

Unportable? It's at least as portable as u32 is, surely? We probably
wouldn't have used <stdint.h> in the kernel anyway -- we define them
ourselves.

The header files are completely irrelevant too -- we're talking about
'u32' not '__u32'.

The important thing is your belief that it's ugly, which is what was
documented.

> I really object to this whole thing. The fact is, "u8" and friends _are_
> the standard types as far as the kernel is concerned. Claiming that they
> aren't is just silly.

When describing the CodingStyle rules "thou shalt not use typedefs" we
do need to list the exceptions, and that includes 'u32' et al.

Yes, those _are_ acceptable in the kernel. That's what the document
_says_. It _doesn't_ say that they're not.

--
dwmw2

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/