Re: [PATCH 1/1] i2c: core: fix a code to suppress a warning

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

 



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



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux