From: Lukasz Luba <lukasz.luba@arm.com>
To: Zhang Qilong <zhangqilong3@huawei.com>, sudeep.holla@arm.com
Cc: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH -next] firmware: arm_scmi: Add the trace_scmi_xfer_end
Date: Fri, 16 Oct 2020 11:32:00 +0100 [thread overview]
Message-ID: <de6d6410-e4f6-d987-612c-baa7cbd0b416@arm.com> (raw)
In-Reply-To: <20201016090815.28160-1-zhangqilong3@huawei.com>
On 10/16/20 10:08 AM, Zhang Qilong wrote:
> 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);
>
>
I think it makes sense, the 'begin' trace entry will always be paired
with 'end'. For the post processing the trace, it would be easier to
reconstruct such transfer and mark immediately as 'not sent' (avoiding
to bother about entries which only have 'begin').
Sudeep, in case you consider to take it, feel free to add:
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Regards,
Lukasz
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-10-16 10:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 9:08 [PATCH -next] firmware: arm_scmi: Add the trace_scmi_xfer_end Zhang Qilong
2020-10-16 10:32 ` Lukasz Luba [this message]
2020-10-16 11:50 ` Cristian Marussi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=de6d6410-e4f6-d987-612c-baa7cbd0b416@arm.com \
--to=lukasz.luba@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=sudeep.holla@arm.com \
--cc=zhangqilong3@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox