]> Git Repo - linux.git/commitdiff
i2c: fix parameter of trace_i2c_result
authorAhbong Chang <[email protected]>
Sat, 31 Mar 2018 08:17:34 +0000 (16:17 +0800)
committerWolfram Sang <[email protected]>
Tue, 3 Apr 2018 14:37:45 +0000 (16:37 +0200)
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 <[email protected]>
Reviewed-by: Todd Poynor <[email protected]>
Reviewed-by: David Howells <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
drivers/i2c/i2c-core-base.c

index c8bfe008f208869d9c070d3cb3138ec01f379e51..a7909d196f4cfb20352a6fdc437d71dc2c7ff5b8 100644 (file)
@@ -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;
This page took 0.057968 seconds and 4 git commands to generate.