Re: [PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-17 Thread Wolfram Sang
On Thu, May 10, 2018 at 01:16:59PM +0200, Wolfram Sang wrote: > On Sat, May 05, 2018 at 08:02:21AM -0500, Wenwen Wang wrote: > > In i2c_smbus_xfer_emulated(), the function i2c_transfer() is invoked to > > transfer i2c messages. The number of actual transferred messages is > > returned and saved to

Re: [PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-17 Thread Wolfram Sang
On Thu, May 10, 2018 at 01:16:59PM +0200, Wolfram Sang wrote: > On Sat, May 05, 2018 at 08:02:21AM -0500, Wenwen Wang wrote: > > In i2c_smbus_xfer_emulated(), the function i2c_transfer() is invoked to > > transfer i2c messages. The number of actual transferred messages is > > returned and saved to

Re: [PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-17 Thread Wolfram Sang
> > hopefully I have time to write a small coccinelle rule to find if > > constant values are returned in a function declared as master_xfer. > > That would be a good thing. Did that now and only found drivers which have a (meanwhile) needless parameter check for 'num'. Will set you on CC for

Re: [PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-17 Thread Wolfram Sang
> > hopefully I have time to write a small coccinelle rule to find if > > constant values are returned in a function declared as master_xfer. > > That would be a good thing. Did that now and only found drivers which have a (meanwhile) needless parameter check for 'num'. Will set you on CC for

Re: [PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-15 Thread Peter Rosin
On 2018-05-15 10:58, Wolfram Sang wrote: > Hi Peter, > In i2c_smbus_xfer_emulated(), the function i2c_transfer() is invoked to transfer i2c messages. The number of actual transferred messages is returned and saved to 'status'. If 'status' is negative, that means an error

Re: [PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-15 Thread Peter Rosin
On 2018-05-15 10:58, Wolfram Sang wrote: > Hi Peter, > In i2c_smbus_xfer_emulated(), the function i2c_transfer() is invoked to transfer i2c messages. The number of actual transferred messages is returned and saved to 'status'. If 'status' is negative, that means an error

Re: [PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-15 Thread Wolfram Sang
Hi Peter, > >> In i2c_smbus_xfer_emulated(), the function i2c_transfer() is invoked to > >> transfer i2c messages. The number of actual transferred messages is > >> returned and saved to 'status'. If 'status' is negative, that means an > >> error occurred during the transfer process. In that

Re: [PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-15 Thread Wolfram Sang
Hi Peter, > >> In i2c_smbus_xfer_emulated(), the function i2c_transfer() is invoked to > >> transfer i2c messages. The number of actual transferred messages is > >> returned and saved to 'status'. If 'status' is negative, that means an > >> error occurred during the transfer process. In that

Re: [PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-10 Thread Peter Rosin
On 2018-05-10 13:16, Wolfram Sang wrote: > On Sat, May 05, 2018 at 08:02:21AM -0500, Wenwen Wang wrote: >> In i2c_smbus_xfer_emulated(), the function i2c_transfer() is invoked to >> transfer i2c messages. The number of actual transferred messages is >> returned and saved to 'status'. If 'status'

Re: [PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-10 Thread Peter Rosin
On 2018-05-10 13:16, Wolfram Sang wrote: > On Sat, May 05, 2018 at 08:02:21AM -0500, Wenwen Wang wrote: >> In i2c_smbus_xfer_emulated(), the function i2c_transfer() is invoked to >> transfer i2c messages. The number of actual transferred messages is >> returned and saved to 'status'. If 'status'

Re: [PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-10 Thread Wolfram Sang
On Sat, May 05, 2018 at 08:02:21AM -0500, Wenwen Wang wrote: > In i2c_smbus_xfer_emulated(), the function i2c_transfer() is invoked to > transfer i2c messages. The number of actual transferred messages is > returned and saved to 'status'. If 'status' is negative, that means an > error occurred

Re: [PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-10 Thread Wolfram Sang
On Sat, May 05, 2018 at 08:02:21AM -0500, Wenwen Wang wrote: > In i2c_smbus_xfer_emulated(), the function i2c_transfer() is invoked to > transfer i2c messages. The number of actual transferred messages is > returned and saved to 'status'. If 'status' is negative, that means an > error occurred

[PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-05 Thread Wenwen Wang
In i2c_smbus_xfer_emulated(), the function i2c_transfer() is invoked to transfer i2c messages. The number of actual transferred messages is returned and saved to 'status'. If 'status' is negative, that means an error occurred during the transfer process. In that case, the value of 'status' is an

[PATCH v2 2/2] i2c: core-smbus: fix a potential missing-check bug

2018-05-05 Thread Wenwen Wang
In i2c_smbus_xfer_emulated(), the function i2c_transfer() is invoked to transfer i2c messages. The number of actual transferred messages is returned and saved to 'status'. If 'status' is negative, that means an error occurred during the transfer process. In that case, the value of 'status' is an