[PATCH -next] firmware: arm_scmi: Add the trace_scmi_xfer_end

Zhang Qilong
2020-10-16T08:59:27Z

Missing the trace_scmi_xfer_end in exception path of scmi_do_xfer.

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
drivers/firmware/arm_scmi/driver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index 03ec74242c14..1a8661514a25 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -368,7 +368,7 @@ int scmi_do_xfer(const struct scmi_handle *handle, struct scmi_xfer *xfer)
ret = info->desc->ops->send_message(cinfo, xfer);
if (ret < 0) {
dev_dbg(dev, "Failed to send message %d\n", ret);
- return ret;
+ goto out;
}

if (xfer->hdr.poll_completion) {
@@ -396,6 +396,7 @@ int scmi_do_xfer(const struct scmi_handle *handle, struct scmi_xfer *xfer)
if (info->desc->ops->mark_txdone)
info->desc->ops->mark_txdone(cinfo, ret);

+out:
trace_scmi_xfer_end(xfer->transfer_id, xfer->hdr.id,
xfer->hdr.protocol_id, xfer->hdr.seq, ret);

--
2.17.1