Re: [PATCH v2] i2c: add tracepoints for I2C slave events

From: Jae Hyun Yoo
Date: Fri Mar 18 2022 - 10:09:40 EST


Hi Wolfram,

On 3/18/2022 3:53 AM, Wolfram Sang wrote:
+ if (trace_i2c_slave_enabled() && !ret)
+ trace_i2c_slave(client, event, val);

Why '!ret'? I think we should always print 'ret' in the trace as well.
Backends are allowed to send errnos on WRITE_RECEIVED to NACK the
reception of a byte. This is useful information, too, or?

Ah, you are right. As itself should trace all events including NACK
cases, it'd be better to print out the 'ret' too. I'll add it to v3.

Thanks,
Jae