* [PATCH] USB: cdc-wdm: use IS_REACHABLE(CONFIG_WWAN) for WWAN integration
@ 2026-12-04 2:17 Pengpeng Hou
2026-12-04 2:42 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Pengpeng Hou @ 2026-12-04 2:17 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-usb, Pengpeng Hou, Rikard Falkeborn, Oliver Neukum
A modular CDC WDM driver skips its WWAN port integration when the WWAN
core is also a module. Both components are linkable in that combination.
Use IS_REACHABLE so known port types can register with WWAN. Keep the
checks for unknown types and unsuccessful registration.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: 89212e160b81 ("net: wwan: Fix WWAN config symbols")
Signed-off-by: Pengpeng Hou <hppiscas@163.com>
---
The earlier IS_ENABLED proposal did not distinguish a built-in WDM
consumer from a module-only WWAN provider. The subsequent fix changed
the symbol name, but a test for the built-in form still excludes WWAN=m.
https://lore.kernel.org/r/20210929132143.36822-2-rikard.falkeborn@gmail.com
The patch was prepared with Gemini and revised with Codex assistance
(Assisted-by: gpt 5).
Built cdc-wdm.o on x86-64 with GCC 11.4 and W=1. With USB_WDM=m and
WWAN=m the WWAN port creation reference was absent before and present
after the fix. With USB_WDM=y and WWAN=m it remained absent. No modem
was exercised.
drivers/usb/class/cdc-wdm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index 7556c0dac908a5c2e63eaaa03411579a660f242a..e0b881cb0fc7c599dc7cf3c82c5d13da17ef362f 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -822,7 +822,7 @@ static struct usb_class_driver wdm_class = {
};
/* --- WWAN framework integration --- */
-#ifdef CONFIG_WWAN
+#if IS_REACHABLE(CONFIG_WWAN)
static int wdm_wwan_port_start(struct wwan_port *port)
{
struct wdm_device *desc = wwan_port_get_drvdata(port);
base-commit: d06ce6f1eb5eeffd4ebcfde345dc34a98131d106
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] USB: cdc-wdm: use IS_REACHABLE(CONFIG_WWAN) for WWAN integration
2026-12-04 2:17 [PATCH] USB: cdc-wdm: use IS_REACHABLE(CONFIG_WWAN) for WWAN integration Pengpeng Hou
@ 2026-12-04 2:42 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-12-04 2:42 UTC (permalink / raw)
To: Pengpeng Hou; +Cc: linux-usb
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] usb: cdc-wdm: Fixes trailer cites 89212e160b81 instead of
04d2b7553708
--
commit 8de670fa59d2b74b89301b5fc0288be89ca5484e
Author: Pengpeng Hou <hppiscas@163.com>
> USB: cdc-wdm: use IS_REACHABLE(CONFIG_WWAN) for WWAN integration
>
> A modular CDC WDM driver skips its WWAN port integration when the WWAN
> core is also a module. Both components are linkable in that combination.
>
> Use IS_REACHABLE so known port types can register with WWAN. Keep the
> checks for unknown types and unsuccessful registration.
>
> The issue was found by our static-analysis tool and manually reviewed.
>
> Fixes: 89212e160b81 ("net: wwan: Fix WWAN config symbols")
> Signed-off-by: Pengpeng Hou <hppiscas@163.com>
[Severity: Low]
Should the Fixes tag cite 04d2b7553708 ("usb: cdc-wdm: Fix check for WWAN")
instead?
Commit 89212e160b81 ("net: wwan: Fix WWAN config symbols") only renamed
the Kconfig symbols and did not touch drivers/usb/class/cdc-wdm.c. Because
#ifdef CONFIG_WWAN was introduced by the later commit, stable backports
targeting the earlier one would not match the diff context.
--
Sashiko AI review · https://sashiko.dev/#/patchset/179635067938.74470.13828888520339747814@163.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-04 2:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 2:17 [PATCH] USB: cdc-wdm: use IS_REACHABLE(CONFIG_WWAN) for WWAN integration Pengpeng Hou
2026-12-04 2:42 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox