Re: "u32" versus "__u32"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 29 Jan 2007, Greg KH wrote:

> On Mon, Jan 29, 2007 at 01:03:13PM -0500, Robert P. J. Day wrote:
> >
> >   i want to make sure i understand the issue regarding data types.  as
> > i understand it, it's recommended to use types like "__u32" instead of
> > just "u32", but that's really true only for stuff that will get
> > exported to user space, right?
> >
> >   in short, it's only an issue in header files that are populated via
> > running "make headers_install"?  is that correct?
>
> Perhaps this old article might help out:
> 	http://www.linuxdevices.com/articles/AT5340618290.html

ok, so as a real-life example (and, coincidentally involving one of
the very header files greg uses in that article), after i run "make
headers_install", what i get under <linux>/usr/include is the set of
sanitized headers that can be used in user space, right?

but if you look in (as one example) include/linux/usbdevice_fs.h, you
can see:

...
#define USBDEVFS_REAPURB           _IOW('U', 12, void *)
#define USBDEVFS_REAPURB32         _IOW('U', 12, u32)
#define USBDEVFS_REAPURBNDELAY     _IOW('U', 13, void *)
#define USBDEVFS_REAPURBNDELAY32   _IOW('U', 13, u32)
...

shouldn't those two instances of "u32" be "__u32" instead?  or am i
just misunderstanding this horribly?

rday

-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://www.fsdev.dreamhosters.com/wiki/index.php?title=Main_Page
========================================================================

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux