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

Cristian Marussi cristian.marussi at arm.com
Fri Oct 16 07:50:00 EDT 2020


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 at 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 at arm.com>
> 

Looks good to me.

Reviewed-by: Cristian Marussi <cristian.marussi at arm.com>

Thanks

Cristian

> Regards,
> Lukasz
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel



More information about the linux-arm-kernel mailing list