Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: Leo Yan <leo.yan@arm.com>, Jie Gan <jie.gan@oss.qualcomm.com>
Cc: 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 15:00:28 +0100	[thread overview]
Message-ID: <978556ae-a158-4289-afcf-423a4329bb72@arm.com> (raw)
In-Reply-To: <20260508134437.GH3778514@e132581.arm.com>

On 08/05/2026 14:44, 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.

Yes please ^

Cheers
Suzuki


> 
> For this patch:
> 
> Reviewed-by: Leo Yan <leo.yan@arm.com>



      parent reply	other threads:[~2026-05-08 14:01 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
2026-05-08 14:00   ` Suzuki K Poulose [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=978556ae-a158-4289-afcf-423a4329bb72@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=coresight@lists.linaro.org \
    --cc=james.clark@linaro.org \
    --cc=jie.gan@oss.qualcomm.com \
    --cc=leo.yan@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.leach@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