From: sashiko-bot@kernel.org
To: "Aaradhana Sahu" <aaradhana.sahu@oss.qualcomm.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH ath-next 16/17] wifi: ath12k: Resolve userPD ID per device
Date: Thu, 08 Oct 2026 10:43:09 +0000 [thread overview]
Message-ID: <sashiko-outbox-164038@kernel.org> (raw)
In-Reply-To: <20261008-mpp_bringup-v1-16-2c5797b5e4ac@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] style: inefficient NULL check inside resource loop
--
commit 1ba3501c64845782d9fd054ea266b2485861b530
Author: Aaradhana Sahu <aaradhana.sahu@oss.qualcomm.com>
wifi: ath12k: Resolve userPD ID per device
This commit resolves the userPD ID based on the device address rather than
hardcoding it during AHB probe, which is necessary for multi-PD platforms.
It also sets multi-PD support based on the AHB device descriptor.
> diff --git a/drivers/net/wireless/ath/ath12k/wifi7/ahb.c b/drivers/net/wireless/ath/ath12k/wifi7/ahb.c
> index bff48b2fe124d..86359ed1eeb2b 100644
> --- a/drivers/net/wireless/ath/ath12k/wifi7/ahb.c
> +++ b/drivers/net/wireless/ath/ath12k/wifi7/ahb.c
[ ... ]
> @@ -43,6 +47,26 @@ static const struct of_device_id ath12k_wifi7_ahb_of_match[] = {
>
> MODULE_DEVICE_TABLE(of, ath12k_wifi7_ahb_of_match);
>
> +static u32 ath12k_wifi7_ahb_get_userpd_id(struct ath12k_base *ab)
> +{
> + const struct ath12k_ahb_userpd_map *map;
> + struct resource *res;
> + size_t i;
> +
> + res = platform_get_resource(ab->pdev, IORESOURCE_MEM, 0);
> +
> + for (i = 0; i < ARRAY_SIZE(ath12k_wifi7_ahb_userpd_map); i++) {
> + map = &ath12k_wifi7_ahb_userpd_map[i];
> +
> + if (res) {
[Severity: Low]
This isn't a bug, but could the NULL check for res be moved outside the loop?
Since res is retrieved before the loop and does not change during the iteration
in ath12k_wifi7_ahb_get_userpd_id(), checking it on every pass is redundant.
Returning early if res is NULL might make this slightly cleaner.
> + if (map->io_start == res->start)
> + return map->upd_id;
> + }
> + }
> +
> + return 0;
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261008-mpp_bringup-v1-0-2c5797b5e4ac@oss.qualcomm.com?part=16
next prev parent reply other threads:[~2026-10-08 10:43 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 10:23 [PATCH ath-next 00/17] wifi: ath12k: Add support for QCN6432 Aaradhana Sahu
2026-10-08 10:23 ` [PATCH ath-next 01/17] dt-bindings: net: wireless: Add QCN6432 device tree binding documentation Aaradhana Sahu
2026-10-09 10:30 ` Krzysztof Kozlowski
2026-10-12 5:29 ` Aaradhana Sahu
2026-10-12 5:56 ` Krzysztof Kozlowski
2026-10-12 6:43 ` Aaradhana Sahu
2026-10-08 10:23 ` [PATCH ath-next 02/17] wifi: ath12k: Refactor PCI operations and MSI config structure Aaradhana Sahu
2026-10-08 10:23 ` [PATCH ath-next 03/17] wifi: ath12k: Add hardware parameter for QCN6432 Aaradhana Sahu
2026-10-08 10:24 ` [PATCH ath-next 04/17] wifi: ath12k: Add hardware ring mask " Aaradhana Sahu
2026-10-08 10:24 ` [PATCH ath-next 05/17] wifi: ath12k: add hardware registers " Aaradhana Sahu
2026-10-08 10:24 ` [PATCH ath-next 06/17] wifi: ath12k: move multi MSI vector flag to ath12k_dev_flags Aaradhana Sahu
2026-10-08 10:24 ` [PATCH ath-next 07/17] wifi: ath12k: Add hybrid_bus_type in ath12k_hw_params Aaradhana Sahu
2026-10-08 10:24 ` [PATCH ath-next 08/17] wifi: ath12k: Add hif operation support for QCN6432 Aaradhana Sahu
2026-10-08 10:24 ` [PATCH ath-next 09/17] wifi: ath12k: add support for unified data-region memory allocation Aaradhana Sahu
2026-10-08 10:35 ` sashiko-bot
2026-10-12 7:25 ` Aaradhana Sahu
2026-10-08 10:24 ` [PATCH ath-next 10/17] wifi: ath12k: move MSI config to pci.c Aaradhana Sahu
2026-10-08 10:24 ` [PATCH ath-next 11/17] wifi: ath12k: Add platform MSI support for CE Aaradhana Sahu
2026-10-08 10:41 ` sashiko-bot
2026-10-13 11:00 ` Aaradhana Sahu
2026-10-08 10:24 ` [PATCH ath-next 12/17] wifi: ath12k: Enable MSI interrupt support for DP interrupt Aaradhana Sahu
2026-10-08 10:45 ` sashiko-bot
2026-10-13 5:26 ` Aaradhana Sahu
2026-10-08 10:24 ` [PATCH ath-next 13/17] wifi: ath12k: use CMEM write for PPT on hybrid bus devices Aaradhana Sahu
2026-10-08 10:24 ` [PATCH ath-next 14/17] wifi: ath12k: store and use MSI data per CE and DP interrupt group for QCN6432 Aaradhana Sahu
2026-10-08 10:24 ` [PATCH ath-next 15/17] wifi: ath12k: Derive QMI service instance ID per protection domain Aaradhana Sahu
2026-10-08 10:24 ` [PATCH ath-next 16/17] wifi: ath12k: Resolve userPD ID per device Aaradhana Sahu
2026-10-08 10:43 ` sashiko-bot [this message]
2026-10-12 9:30 ` Aaradhana Sahu
2026-10-08 10:24 ` [PATCH ath-next 17/17] wifi: ath12k: Add QCN6432 AHB support Aaradhana Sahu
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=sashiko-outbox-164038@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=aaradhana.sahu@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--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 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.