Re: [PATCH] synclink_gt fix size of register value storage

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

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux