On Tue, 2015-09-15 at 15:00 +0200, Wolfram Sang wrote: > > > > > > I2C_M_RD is defined as 1, probably (msg->flags & I2C_M_RD) is > > > > good > > > > enough here. > > > > > > Today is 1, tomorrow is 0x80, so, I would stay as I put in the > > > initial > > > fix. > > > > I believe I2C_M_RD will never get any other value than 1, since > > this > > value is deliberately set to 1 and it is in active use by userspace > > applications for years, nobody intends to break ABI tomorrow. > > I agree. That is one thing that permanently slips through the cracks, > but I wanted to add a comment saying the I2C_M_RD is guaranteed to be > 1 > and then simplify the drivers. Yes, with comment on I2C_M_RD we may drop wrong assumptions. > > Maybe I should start with the comment right now... Please, update my patch accordingly, or ping me to update it. Right now busy with something else. -- Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Intel Finland Oy -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html