From: sashiko-bot@kernel.org
To: "Lorenzo Bianconi" <lorenzo.bianconi@oss.qualcomm.com>
Cc: linux-pci@vger.kernel.org, robh@kernel.org,
devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v5 3/5] PCI/pwrctrl: tc9563: Add GPIO auxiliary device support
Date: Wed, 09 Sep 2026 15:15:50 +0000 [thread overview]
Message-ID: <20260909151551.2DA281F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260909-pci-tc9563-aux-v5-3-c9b33f56c8d3@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Auxiliary device teardown via devres races with manual power off in remove(), allowing I/O to powered-down hardware.
- [Low] Missing explicit `select AUXILIARY_BUS` in Kconfig for PCI_PWRCTRL_TC9563.
--
commit 6f8a88de67f080d18050c0ce0599dc8854f71eab
Author: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
PCI/pwrctrl: tc9563: Add GPIO auxiliary device support
This commit adds an auxiliary device to represent the GPIO controller
embedded in the TC9563. It passes the regmap via platform data to enable
the gpio-tc9563 driver to register the GPIO chip.
> diff --git a/drivers/pci/pwrctrl/Kconfig b/drivers/pci/pwrctrl/Kconfig
> --- a/drivers/pci/pwrctrl/Kconfig
> +++ b/drivers/pci/pwrctrl/Kconfig
> @@ -29,6 +29,7 @@ config PCI_PWRCTRL_TC9563
> select PCI_PWRCTRL
> default m if ARCH_QCOM
> depends on I2C
> + depends on GPIO_TC9563
> select REGMAP_I2C
[Severity: Low]
Since the driver now directly calls auxiliary bus symbols, should this config
explicitly select AUXILIARY_BUS to prevent potential build failures if
transitive dependencies change?
> diff --git a/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c b/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c
> --- a/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c
> +++ b/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c
[ ... ]
> +static int tc9563_pwrctrl_adev_add(struct device *dev, const char *name,
> + struct device_node *of_node,
> + void *priv_data)
> +{
[ ... ]
> + ret = auxiliary_device_add(adev);
> + if (ret) {
> + auxiliary_device_uninit(adev);
> + return ret;
> + }
> +
> + return devm_add_action_or_reset(dev, tc9563_pwrctrl_adev_remove, adev);
> +}
[Severity: High]
Because the auxiliary device is queued for removal via devres, won't it be
destroyed after the driver's manual remove function executes?
If the hardware is shut down and the adapter reference is dropped in the
driver's manual remove path before the devres callbacks run, couldn't this
allow I/O to powered-down hardware if another process accesses the GPIO
sysfs interface during this teardown window?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-pci-tc9563-aux-v5-0-c9b33f56c8d3@oss.qualcomm.com?part=3
next prev parent reply other threads:[~2026-09-09 15:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 14:55 [PATCH v5 0/5] PCI/pwrctrl: tc9563: Introduce support for embedded GPIO controller Lorenzo Bianconi
2026-09-09 14:55 ` [PATCH v5 1/5] dt-bindings: PCI: toshiba,tc9563: Document " Lorenzo Bianconi
2026-09-09 15:04 ` sashiko-bot
2026-09-09 15:38 ` Lorenzo Bianconi
2026-09-11 7:29 ` Krzysztof Kozlowski
2026-09-09 14:55 ` [PATCH v5 2/5] gpio: tc9563: Add support for the " Lorenzo Bianconi
2026-09-09 15:06 ` sashiko-bot
2026-09-09 14:55 ` [PATCH v5 3/5] PCI/pwrctrl: tc9563: Add GPIO auxiliary device support Lorenzo Bianconi
2026-09-09 15:15 ` sashiko-bot [this message]
2026-09-09 15:42 ` Lorenzo Bianconi
2026-09-09 14:55 ` [PATCH v5 4/5] PCI/pwrctrl: tc9563: Switch per-port reset to GPIO descriptor API Lorenzo Bianconi
2026-09-09 15:05 ` sashiko-bot
2026-09-09 14:55 ` [PATCH v5 5/5] arm64: dts: qcom: qcs6490-rb3gen2: Enable TC9563 embedded GPIO controller Lorenzo Bianconi
2026-09-09 15:05 ` sashiko-bot
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=20260909151551.2DA281F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.bianconi@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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