From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>
Cc: Pengyu Luo <mitltlatltl@gmail.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] usb: typec: ucsi: gaokun: unwind notifier on UCSI register failure
Date: Wed, 8 Jul 2026 14:10:19 +0200 [thread overview]
Message-ID: <2026070809-audibly-panoramic-466a@gregkh> (raw)
In-Reply-To: <20260622153230.75195-1-pengpeng@iscas.ac.cn>
On Mon, Jun 22, 2026 at 11:32:30PM +0800, Pengpeng Hou wrote:
> gaokun_ucsi_register_worker() registers the EC notifier before calling
> ucsi_register(). If ucsi_register() fails, the worker currently only logs
> the error and leaves the notifier registered. Later EC events can then
> call into an unpublished UCSI instance. The remove path also
> unconditionally unregisters the notifier and UCSI device even if the
> delayed worker failed before both were published.
>
> Unregister the notifier immediately when ucsi_register() fails, and track
> only the fully published state. The remove path then tears down the pair
> only if both publication steps completed.
>
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
> ---
> Changes since v1:
> - Drop the two-flag bookkeeping objected to by Greg Kroah-Hartman.
> - Keep the existing registration order, but use a single flag that is set
> only after both the notifier and UCSI device are published.
> - Unregister the EC notifier immediately if ucsi_register() fails.
> - Compile-tested only; no Gaokun hardware was available.
Does not apply against 7.2-rc2 :(
prev parent reply other threads:[~2026-07-08 12:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 15:32 [PATCH v2] usb: typec: ucsi: gaokun: unwind notifier on UCSI register failure Pengpeng Hou
2026-06-23 12:10 ` Heikki Krogerus
2026-06-27 5:33 ` Pengyu Luo
2026-07-08 12:10 ` Greg Kroah-Hartman [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=2026070809-audibly-panoramic-466a@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mitltlatltl@gmail.com \
--cc=pengpeng@iscas.ac.cn \
/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