Re: brcm80211 typedef bug

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

 



Henry,

Henry Ptasinski wrote:
On Thu, Sep 16, 2010 at 01:35:15PM -0700, Jason wrote:
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'?

Up to this point, I've been strictly doing literal substitutions...



Jason,

Thanks for embarking on this adventure!


Thanks for sharing the code!

When replacing explicitly-sized (i.e. uint32, int16) types, the
substitution should be with the native type of the same explicit
size.  I.e. uint32 should be replaced with uint32_t, int16 should be
replaced with int16_t.


Okay, that's what my gut was telling me, but I didn't want to make an assumption about code I didn't write.  ;-)  As Greg suggested, I'll go with s/uint32/u32/g.

thx,

Jason.
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux