Skip to content

Commit

Permalink
i2c: fix parameter of trace_i2c_result
Browse files Browse the repository at this point in the history
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@google.com>
Reviewed-by: Todd Poynor <toddpoynor@google.com>
Reviewed-by: David Howells <dhowells@redhat.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
  • Loading branch information
Ahbong Chang authored and Wolfram Sang committed Apr 3, 2018
1 parent d9a22d7 commit 4a3f769
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/i2c-core-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1876,7 +1876,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;
Expand Down

0 comments on commit 4a3f769

Please sign in to comment.