Browse Source
mock_i3c_target_tx() did not update *num_sent before returning. Although some callers may not directly use this value, i3c_send() passes num_sent to trace_i3c_send(). If the target TX callback does not initialize *num_sent, the trace output may report an incorrect or uninitialized value, leading to confusing debugging information. For example, the following trace was observed: mock_i3c_target_tx I3C mock target write 0x12 i3c_send I3C send 0/1 bytes, ack=1 (expected 1/1 bytes) This happens because *num_sent was never set by the TX callback. Fix this by setting *num_sent in all return paths, including the IBI magic handling case, to accurately reflect the number of bytes consumed. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com> Link: https://lore.kernel.org/qemu-devel/20260303013322.1297499-3-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>master
committed by
Cédric Le Goater
1 changed files with 2 additions and 0 deletions
Loading…
Reference in new issue