All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Manivannan Sadhasivam via B4 Relay"
	<devnull+manivannan.sadhasivam.oss.qualcomm.com@kernel.org>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH v2 7/9] Bluetooth: hci_qca: Rename 'power_ctrl_enabled' to 'bt_en_available'
Date: Fri, 08 May 2026 00:53:00 +0000	[thread overview]
Message-ID: <20260508005301.1DB0FC2BCB2@smtp.kernel.org> (raw)
In-Reply-To: <20260507-pwrseq-m2-bt-v2-7-1740bd478539@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The rename of 'power_ctrl_enabled' to 'bt_en_available' introduces a misleading semantic mismatch and contradicts the commit message.
--

commit ebe40bb62789f8cbdbd8baa6c8be848d58c9f72b
Author: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>

Bluetooth: hci_qca: Rename 'power_ctrl_enabled' to 'bt_en_available'

This commit renames the power_ctrl_enabled flag to bt_en_available in
qca_serdev_probe(), with the commit message stating that the flag only
indicates the availability of the BT_EN GPIO.

> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
[ ... ]
> @@ -2391,7 +2391,7 @@ static int qca_serdev_probe(struct serdev_device *serdev)
>  	struct hci_dev *hdev;
>  	const struct qca_device_data *data;
>  	int err;
> -	bool power_ctrl_enabled = true;
> +	bool bt_en_available = true;

Is the description in the commit message accurate?

Looking at qca_serdev_probe(), there are several paths where the BT_EN GPIO
is not present, but this flag remains true. For example, with a QCA_WCN3990
device, qcadev->bt_en can be NULL. Since it doesn't match the specific
SoC types in the checks below, bt_en_available is never set to false:

qca_serdev_probe() {
        ...
        qcadev->bt_en = devm_gpiod_get_optional(&serdev->dev, "enable",
                                       GPIOD_OUT_LOW);
        ...
        if (!qcadev->bt_en &&
            (data->soc_type == QCA_WCN6750 ||
             data->soc_type == QCA_WCN6855 ||
             data->soc_type == QCA_WCN7850))
                bt_en_available = false;
        ...
}

The original power_ctrl_enabled flag tracked whether any driver-managed
power control (such as regulators or a generic power sequencer) was
available, ensuring the qca_hci_shutdown callback is registered.

Does renaming this generic power control flag to bt_en_available introduce
a mismatch where bt_en_available is true while qcadev->bt_en is NULL,
potentially confusing future modifications?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260507-pwrseq-m2-bt-v2-0-1740bd478539@oss.qualcomm.com?part=7

  reply	other threads:[~2026-05-08  0:53 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07 16:06 [PATCH v2 0/9] Fixes/improvements for the PCI M.2 power sequencing driver Manivannan Sadhasivam
2026-05-07 16:06 ` Manivannan Sadhasivam via B4 Relay
2026-05-07 16:06 ` [PATCH v2 1/9] power: sequencing: pcie-m2: Fix inconsistent function prefixes Manivannan Sadhasivam
2026-05-07 16:06   ` Manivannan Sadhasivam via B4 Relay
2026-05-07 18:51   ` Fixes/improvements for the PCI M.2 power sequencing driver bluez.test.bot
2026-05-07 16:06 ` [PATCH v2 2/9] power: sequencing: pcie-m2: Allow creating serdev for multiple PCI devices Manivannan Sadhasivam
2026-05-07 16:06   ` Manivannan Sadhasivam via B4 Relay
2026-05-07 23:28   ` sashiko-bot
2026-05-07 16:06 ` [PATCH v2 3/9] power: sequencing: pcie-m2: Improve PCI device ID check Manivannan Sadhasivam
2026-05-07 16:06   ` Manivannan Sadhasivam via B4 Relay
2026-05-07 16:06 ` [PATCH v2 4/9] power: sequencing: pcie-m2: Create serdev for PCI devices present before probe Manivannan Sadhasivam
2026-05-07 16:06   ` Manivannan Sadhasivam via B4 Relay
2026-05-07 23:54   ` sashiko-bot
2026-05-11 11:45   ` Bartosz Golaszewski
2026-05-07 16:06 ` [PATCH v2 5/9] power: sequencing: pcie-m2: Create BT node based on the pci_device_id[] table Manivannan Sadhasivam
2026-05-07 16:06   ` Manivannan Sadhasivam via B4 Relay
2026-05-07 16:06 ` [PATCH v2 6/9] Bluetooth: hci_qca: Add M.2 Bluetooth device support using pwrseq Manivannan Sadhasivam
2026-05-07 16:06   ` Manivannan Sadhasivam via B4 Relay
2026-05-08  0:44   ` sashiko-bot
2026-05-07 16:06 ` [PATCH v2 7/9] Bluetooth: hci_qca: Rename 'power_ctrl_enabled' to 'bt_en_available' Manivannan Sadhasivam
2026-05-07 16:06   ` Manivannan Sadhasivam via B4 Relay
2026-05-08  0:53   ` sashiko-bot [this message]
2026-05-11 11:34   ` Bartosz Golaszewski
2026-05-07 16:06 ` [PATCH v2 8/9] power: sequencing: Add an API to return the pwrseq device's 'dev' pointer Manivannan Sadhasivam
2026-05-07 16:06   ` Manivannan Sadhasivam via B4 Relay
2026-05-08  1:16   ` sashiko-bot
2026-05-11 11:34   ` Bartosz Golaszewski
2026-05-07 16:06 ` [PATCH v2 9/9] Bluetooth: hci_qca: Set 'bt_en_available' based on W_DISABLE2# presence in M.2 connector Manivannan Sadhasivam
2026-05-07 16:06   ` Manivannan Sadhasivam via B4 Relay
2026-05-08  2:06   ` sashiko-bot
2026-05-11 11:36   ` Bartosz Golaszewski
2026-05-08 12:49 ` [PATCH v2 0/9] Fixes/improvements for the PCI M.2 power sequencing driver Wei Deng

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=20260508005301.1DB0FC2BCB2@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=devnull+manivannan.sadhasivam.oss.qualcomm.com@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=sashiko@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.