mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@arm.com>
To: James Clark <james.clark@linaro.org>,
	coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Mike Leach <mike.leach@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Mao Jinlong <quic_jinlmao@quicinc.com>
Subject: Re: [PATCH v3 8/8] coresight: Unify error handling in coresight_register()
Date: Mon, 9 Feb 2026 11:59:27 +0000	[thread overview]
Message-ID: <20260209115927.GM3529712@e132581.arm.com> (raw)
In-Reply-To: <20260209112819.GL3529712@e132581.arm.com>

On Mon, Feb 09, 2026 at 11:28:19AM +0000, Coresight ML wrote:

[...]

> > Probably a better way to clean this up would be to pull out a function for
> > all the stuff that needs to be locked and use guard(). Then do the stuff
> > that doesn't need to be locked after that function. Either way it doesn't
> > look wrong.
> 
> If so, although locking is not a concern, the device_register() failures
> still need to release platform data particularly.  That means we still
> need extra flag (or returned error) to indicate if it is a
> device_register() failure.
> 
> I understand we don't want multiple places for mutex release.  It is
> not bad to keep the "registered" flag and drop this patch.

Think again, I found we still need the refactor for the failure
from etm_perf_add_symlink_sink().  This can be unified to call
coresight_unregister() for error handling.

I will send a new series for review.

Thanks,
Leo

  reply	other threads:[~2026-02-09 11:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02  9:33 [PATCH v3 0/8] coresight: Fix device registration and unregistration Leo Yan
2026-02-02  9:33 ` [PATCH v3 1/8] coresight: Fix memory leak in coresight_alloc_device_name() Leo Yan
2026-02-02  9:33 ` [PATCH v3 2/8] coresight: Get parent device reference after sink ID map allocation Leo Yan
2026-02-02  9:33 ` [PATCH v3 3/8] coresight: Protect unregistration with mutex Leo Yan
2026-02-02  9:34 ` [PATCH v3 4/8] coresight: Refactor output connection sysfs link cleanup Leo Yan
2026-02-02  9:34 ` [PATCH v3 5/8] coresight: Refactor sysfs connection group cleanup Leo Yan
2026-02-02  9:34 ` [PATCH v3 6/8] coresight: Move sink validation into etm_perf_add_symlink_sink() Leo Yan
2026-02-02  9:34 ` [PATCH v3 7/8] coresight: Do not mix success path with failure handling Leo Yan
2026-02-02  9:34 ` [PATCH v3 8/8] coresight: Unify error handling in coresight_register() Leo Yan
2026-02-03 11:15   ` James Clark
2026-02-09 11:28     ` Leo Yan
2026-02-09 11:59       ` Leo Yan [this message]
2026-02-03 11:13 ` [PATCH v3 0/8] coresight: Fix device registration and unregistration James Clark

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=20260209115927.GM3529712@e132581.arm.com \
    --to=leo.yan@arm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=coresight@lists.linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=james.clark@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mike.leach@arm.com \
    --cc=quic_jinlmao@quicinc.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

all inboxes | Powered by JetHome®