From: Jie Gan <jie.gan@oss.qualcomm.com>
To: Leo Yan <leo.yan@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>,
Mike Leach <mike.leach@arm.com>,
James Clark <james.clark@linaro.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Tingwei Zhang <tingwei.zhang@oss.qualcomm.com>,
coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] coresight: fix missing error code when trace ID is invalid
Date: Fri, 8 May 2026 21:53:03 +0800 [thread overview]
Message-ID: <d2d58621-77c9-4075-9904-5b7a2cc2b9fe@oss.qualcomm.com> (raw)
In-Reply-To: <20260508134437.GH3778514@e132581.arm.com>
Hi Leo,
On 5/8/2026 9:44 PM, Leo Yan wrote:
> On Fri, May 08, 2026 at 01:45:35PM +0800, Jie Gan wrote:
>
> [...]
>
>> coresight_path_assign_trace_id(path, CS_MODE_SYSFS);
>> - if (!IS_VALID_CS_TRACE_ID(path->trace_id))
>> + if (!IS_VALID_CS_TRACE_ID(path->trace_id)) {
>> + ret = -EINVAL;
>> goto err_path;
>> + }
>
> On the top of this patch, could we do a further improvement?
>
> Move IS_VALID_CS_TRACE_ID() into coresight_path_assign_trace_id() and
> return 0 for success and < 0 for failures. As result, callers only
> need to check the returned value.
>
That's a good suggestion. I will check these logic once. I will send a
new patch to do the refactor if worth.
Thanks,
Jie
> For this patch:
>
> Reviewed-by: Leo Yan <leo.yan@arm.com>
next prev parent reply other threads:[~2026-05-08 13:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-08 5:45 [PATCH] coresight: fix missing error code when trace ID is invalid Jie Gan
2026-05-08 8:25 ` James Clark
2026-05-08 13:44 ` Leo Yan
2026-05-08 13:53 ` Jie Gan [this message]
2026-05-08 14:00 ` Suzuki K Poulose
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=d2d58621-77c9-4075-9904-5b7a2cc2b9fe@oss.qualcomm.com \
--to=jie.gan@oss.qualcomm.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=coresight@lists.linaro.org \
--cc=james.clark@linaro.org \
--cc=leo.yan@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.leach@arm.com \
--cc=suzuki.poulose@arm.com \
--cc=tingwei.zhang@oss.qualcomm.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