Re: [PATCH 1/3] Staging: vt6655: remove DWORD typedef

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

 



On 06/24/2010 08:02 PM, Charles Clément wrote:
> Replace all occurrences with unsigned long type, except for pointer fields that
> should be u32 in packed structures and 8-byte-aligned 8 byte long structure
> QWORD.
> 
> Thanks to Jiri Slaby for pointing out that simply replacing by unsigned long is
> wrong on x86-64 arch.

Looks much more better now, thanks. Not that I'm somehow happy with the
long usages there, but that's a separate issue, see below.

> --- a/drivers/staging/vt6655/ttype.h
> +++ b/drivers/staging/vt6655/ttype.h
> @@ -70,15 +70,14 @@ typedef int             BOOL;
>  
>  typedef unsigned char   BYTE;           //  8-bit
>  typedef unsigned short  WORD;           // 16-bit
> -typedef unsigned long   DWORD;          // 32-bit
>  
>  // QWORD is for those situation that we want
>  // an 8-byte-aligned 8 byte long structure
>  // which is NOT really a floating point number.
>  typedef union tagUQuadWord {
>      struct {
> -        DWORD   dwLowDword;
> -        DWORD   dwHighDword;
> +        unsigned int dwLowDword;
> +        unsigned int dwHighDword;
>      } u;
>      double      DoNotUseThisField;
>  } UQuadWord;

I see you are removing all that windows-named type crap. Do you plan to
remove also this evil? I mean s/QWORD/u64/ and fix its users
appropriately. And then remove this UQuadWord thing altogether.

And may I suggest adding a line to the bottom of TODO for these drivers
mentioning that someone should revisit unsigned long usage and try to
lower .data footprint significantly?

thanks,
-- 
js
_______________________________________________
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