Re: [RFC] Splitting kernel headers and deprecating __KERNEL__

Greg KH
2004-11-27T03:29:41Z

On Thu, Nov 25, 2004 at 06:17:42PM +0000, David Woodhouse wrote:
> On Thu, 2004-11-25 at 16:54 +0000, Matthew Wilcox wrote:
> > > (d) stdint types should be used where possible.
> > >
> > > [include/user-i386/termios.h]
> > > struct winsize {
> > > uint16_t ws_row;
> > > uint16_t ws_col;
> > > uint16_t ws_xpixel;
> > > uint16_t ws_ypixel;
> > > };
> >
> > I really hate stdint. Can't we use __u16 instead?
>
> We're trying to clean all this crap up. I think we'd need a better
> justification than 'I hate stdint' to use anything other than the
> standard types which the language provides.

The justification is that it doesn't properly describe the variable size
(think userspace 32 bit variable vs. kernelspace 32 bit variable.) We
need to stick with the proper __u32 type variables for data that crosses
the userspace/kernelspace boundry.

See Linus's posts about this topic on lkml in the past for more details
about this.

thanks,

greg k-h