brcm80211 typedef bug

Greg KH greg at kroah.com
Fri Sep 17 00:05:42 UTC 2010


On Thu, Sep 16, 2010 at 04:35:15PM -0400, Jason wrote:
> Greg,
> 
> Sorry, forgot to include the list.
> 
> Please forgive the simple question, but I want to make sure I'm doing
> this right.  In the adventure that has become typedef removal for
> brcm80211 I found this in or around
> drivers/staging/brcm80211/include/typedefs.h:73
> 
> #ifndef TYPEDEF_UINT32
> typedef unsigned int uint32;
> #endif
> 
> By itself, this should break 64bit builds, right?  As I carefully sed
> out uint32, should I do their literal substitution, 'unsigned int', or
> fix it with 'unsigned long'/'uint32_t'?

Yes, this might cause problems if they used that typedef in a structure
assuming it was always going to be 32 bits (like a register map or
something.)

You should ask the developers of the driver what's going on here.

Oh, and use 'u32' as the type, not any of that uintX_t mess, that's for
userspace, not the kernel :)

thanks,

greg k-h



More information about the devel mailing list