From: Cristian Marussi <cristian.marussi@arm.com>
To: Lukasz Luba <lukasz.luba@arm.com>
Cc: Zhang Qilong <zhangqilong3@huawei.com>,
linux-arm-kernel@lists.infradead.org, sudeep.holla@arm.com
Subject: Re: [PATCH -next] firmware: arm_scmi: Add the trace_scmi_xfer_end
Date: Fri, 16 Oct 2020 12:50:00 +0100 [thread overview]
Message-ID: <20201016114938.GF34395@e120937-lin> (raw)
In-Reply-To: <de6d6410-e4f6-d987-612c-baa7cbd0b416@arm.com>
On Fri, Oct 16, 2020 at 11:32:00AM +0100, Lukasz Luba wrote:
>
>
> 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>
>
Looks good to me.
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Thanks
Cristian
> Regards,
> Lukasz
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2020-10-16 11:51 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
2020-10-16 11:50 ` Cristian Marussi [this message]
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=20201016114938.GF34395@e120937-lin \
--to=cristian.marussi@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=lukasz.luba@arm.com \
--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