On Wed, Sep 08, 2010 at 07:02:33PM -0400, Andy Walls wrote: > On Wed, 2010-09-08 at 13:27 -0400, Jarod Wilson wrote: > > On Wed, Sep 08, 2010 at 12:50:46PM -0400, Andy Walls wrote: > > > On Wed, 2010-09-08 at 11:26 -0400, Jarod Wilson wrote: > > > > On Mon, Sep 6, 2010 at 5:26 PM, Maxim Levitsky <maximlevitsky@xxxxxxxxx> wrote: > > > > > > > > > I'm generally good with this entire patch, but the union usage looks a > > > > bit odd, as the members aren't of the same size, which is generally > > > > what I've come to expect looking at other code. > > > > > > Having a union with different sized members is perfectly valid C code. > > > > > > Yeah, no, I know that it'll work, just that most of the unions I've > > actually paid any attention to had members all of the same size. Seemed > > like sort of an unwritten rule for in-kernel use. But its probably just > > fine. > > Well if it's an unwritten rule, not everyone is following it. :) > There are numerous counter-examples in include/linux/*.h . Here are a > few easy to see ones: Not to mention that the use of a union sends an important message to the programmer reading the code - i.e. that only one of the union members can be used in the same event. -- David Härdeman -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html