Messages in this thread | | | Date | Wed, 18 Jan 2006 09:28:29 -0600 | From | Paul Fulghum <> | Subject | Re: [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/
| |