lkml.org 
[lkml]   [2006]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] synclink_gt fix size of register value storage
Jiri Slaby wrote:
>>- unsigned char val;
>>+ unsigned short val;
>
> Shouldn't be this u16 rather than ushort?

It could be argued that way.
A quick search of CodingStyle does not
reference the uXX types.

unsigned short is guaranteed to be
at least 16 bits, so no data is lost.
The value is written to the register using
writew(), so no more than 16 bits are used.
Using unsigned short here will always work.

Do you know of a Linux environment where
unsigned short is not 16 bits?

--
Paul Fulghum
Microgate Systems, Ltd.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-18 16:31    [W:0.120 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site