From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796352336; b=rbkLOoSgXDXIWwld+lE5WyhhIKz5AlYnRT8juYYefDktQfwWNLXmlhVoSEZ5c/JowQpP rJsCzIGfVh9yJ64xdXeikiXFvn6OamfImrHKpUHfUYWkNfGeJDcFiFH1I0VxXYr1rsGYf bTkno77iGE4rq1NAmcAxNN0tmOr1BD8/IJ3MiNuiK/1fazkDhgaf9p8XXEldrkfFmbXOh /4zTFUMS/3+iqlYxsj4pnggowMAxOtb/CO2LHNKUSWBe7Oq41XLoQ4dTttGtflyIPul0C T1FrU5YyZe/yp5VcECmUIBVLsAdgCqfOFsZvETE5MXpJbOghNydaF/Ax8JmywuafQJQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796352336; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=Bwo82/shibUBtR8S1hdHmbkqpX8rvAZ2pi2vU6KyrnE=; b=1SmBShm/r8QdRzQHeQ9LFv9az9pQHyOJ54apvJS5Zwo1hwET+mn5teoPTnSl6v1v/Hzl xygwwFKV+xhe6Ss4V49+gsaC7euLAi/NqRhF6PuYGzZe8IA3kxhx0q15jpnZPQOadpmOK FwHbw9Knb1wplt0Gu5rWYiWlK3kPUcfosatOxjk7ZxyUwerdFfqxCjbT07hx0ux+XOSdU bjMI2SZMh6ftUSaG1tBm0WDUc4eDgSTo953nl39pn/+OqbNR9hYJ3+1+iExJlofZ+ITxB AAwi8YxPpskXEfbXJ5AZuS3wmQgipgB/FhXbnU+DSZrD9g7SnKELxUUz145TKDov4EQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=giXSl4BO; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BEA02606A322 for ; Fri, 4 Dec 2026 02:45:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=giXSl4BO Received: by smtp.kernel.org (Postfix) with ESMTPSA id 348961F000C2; Fri, 4 Dec 2026 02:45:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796352336; bh=Bwo82/shibUBtR8S1hdHmbkqpX8rvAZ2pi2vU6KyrnE=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=giXSl4BOzdoV9qzhmwi81SDMWRaUcw6fQJzvriz6UtGqeUqTTHVs0KlGy5qJYgBlM UWvSXesJHDhh6yZeouL7sy2qO4c29SkGIJpqQkOyg6+nslZEcUocWiSxRg2NUFq1UY UmE04PPK8Vl7eP2o3ZNfcgfgVcvQ3793+g1tKIqRcYqZvtFS+blLR81yQ9ErhuCc9y RrB7LYpyq3OrQQ7KHxGCyJiqVQDucRSNvJxZfPIGRk+XhXgNye6o5SW0SKyKGpXVZc qMyEKyzSlf3so08wmjvmkhtCYiMJubF3O0XT0sYOaz0ObswCqXI1kBEeVjxY6wd2na /Oz2cAXIA1CKw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] usb: dwc3: qcom: use IS_REACHABLE(CONFIG_USB) for hub speed lookup Reply-To: sashiko-reviews@lists.linux.dev To: "Pengpeng Hou" Cc: linux-usb@vger.kernel.org In-Reply-To: <179635104069.74470.7311513117268429199@163.com> References: <179635104069.74470.7311513117268429199@163.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 02:45:35 +0000 X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] usb: dwc3: qcom: unnecessary usbcore dependency in gadget-only builds -- commit 8d368bc1212d1c6dd44f3c214755c23434636cce Author: Pengpeng Hou usb: dwc3: qcom: use IS_REACHABLE(CONFIG_USB) for hub speed lookup This commit replaces #ifdef CONFIG_USB with #if IS_REACHABLE(CONFIG_USB) around the usb_hub_find_child() call in dwc3_qcom_read_usb2_speed() in both the normal and legacy Qualcomm DWC3 glue drivers. > diff --git a/drivers/usb/dwc3/dwc3-qcom-legacy.c b/drivers/usb/dwc3/dwc3-= qcom-legacy.c > index 189f5447aa786..47a0f717fd53e 100644 > --- a/drivers/usb/dwc3/dwc3-qcom-legacy.c > +++ b/drivers/usb/dwc3/dwc3-qcom-legacy.c > @@ -328,7 +328,7 @@ static enum usb_device_speed dwc3_qcom_read_usb2_spee= d(struct dwc3_qcom *qcom, i > */ > hcd =3D platform_get_drvdata(dwc->xhci); > =20 > -#ifdef CONFIG_USB > +#if IS_REACHABLE(CONFIG_USB) > udev =3D usb_hub_find_child(hcd->self.root_hub, port_index + 1); > #else > udev =3D NULL; > diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c > index a2608416e04ec..6501c00090c88 100644 > --- a/drivers/usb/dwc3/dwc3-qcom.c > +++ b/drivers/usb/dwc3/dwc3-qcom.c > @@ -240,7 +240,7 @@ static enum usb_device_speed dwc3_qcom_read_usb2_spee= d(struct dwc3_qcom *qcom, i > */ > hcd =3D platform_get_drvdata(dwc->xhci); > =20 > -#ifdef CONFIG_USB > +#if IS_REACHABLE(CONFIG_USB) > udev =3D usb_hub_find_child(hcd->self.root_hub, port_index + 1); > #else > udev =3D NULL; [Severity: Low] Does this add an unnecessary module dependency on usbcore.ko in gadget-only DWC3 builds? When CONFIG_USB=3Dm, CONFIG_USB_DWC3=3Dm, CONFIG_USB_DWC3_GADGET=3Dy, and CONFIG_USB_DWC3_QCOM=3Dm, both modules now reference usb_hub_find_child() even though DWC3 host support is compiled out and dwc->xhci is always NULL, preventing them from loading without usbcore.ko in an initramfs. Guarding the lookup with IS_ENABLED(CONFIG_USB_DWC3_HOST) || IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE), matching dwc3_host_init() in drivers/usb/dwc3/core.h, avoids pulling in usbcore.ko in gadget-only builds while Kconfig still guarantees CONFIG_USB is reachable. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/179635104069.74470.= 7311513117268429199@163.com?part=3D1