On Sat, Mar 31, 2018 at 04:17:34PM +0800, cwahbong@xxxxxxxxxx wrote: > From: Ahbong Chang <cwahbong@xxxxxxxxxx> > > According to the event i2c_result defined in include/trace/events/i2c.h, > the second parameter should be the number of messages instead of the > ended loop index. The value of ended loop index is the same as ret. > > Signed-off-by: Ahbong Chang <cwahbong@xxxxxxxxxx> > Reviewed-by: Todd Poynor <toddpoynor@xxxxxxxxxx> CCing David who write the original code... > --- > drivers/i2c/i2c-core-base.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c > index 5a00bf443d06..b76c8119ee43 100644 > --- a/drivers/i2c/i2c-core-base.c > +++ b/drivers/i2c/i2c-core-base.c > @@ -1866,7 +1866,7 @@ int __i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) > for (i = 0; i < ret; i++) > if (msgs[i].flags & I2C_M_RD) > trace_i2c_reply(adap, &msgs[i], i); > - trace_i2c_result(adap, i, ret); > + trace_i2c_result(adap, num, ret); > } > > return ret; > -- > 2.17.0.rc1.321.gba9d0f2565-goog >
Attachment:
signature.asc
Description: PGP signature