[PATCH v2 3/3] phy: tegra: Add support for Tegra238 XUSB pad controller
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Thu Oct 1 06:38:33 PDT 2026
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] phy: tegra: missing Makefile entry causes link failure for TEGRA_238
- [Low] phy: tegra: missing declarations cause compiler warnings
--
commit 7c86bdb1c8a3759375a713aae859eac18c35bda9
Author: Jon Hunter <jonathanh at nvidia.com>
phy: tegra: Add support for Tegra238 XUSB pad controller
This commit adds support for the Tegra238 XUSB pad controller by populating
the specific SoC data. It drops compile-time guards around Tegra186 port ops
and Tegra194 supplies to reuse them for Tegra238.
> diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
> index 0635f0d82c963..89ce9ac873006 100644
> --- a/drivers/phy/tegra/xusb.c
> +++ b/drivers/phy/tegra/xusb.c
[ ... ]
> @@ -78,6 +78,12 @@ static const struct of_device_id tegra_xusb_padctl_of_match[] = {
> .data = &tegra234_xusb_padctl_soc,
> },
> #endif
> +#if defined(CONFIG_ARCH_TEGRA_238_SOC)
> + {
> + .compatible = "nvidia,tegra238-xusb-padctl",
> + .data = &tegra238_xusb_padctl_soc,
> + },
> +#endif
[Severity: Low]
Will this result in a link failure if a kernel is configured with only
CONFIG_ARCH_TEGRA_238_SOC enabled?
The tegra238_xusb_padctl_soc structure is defined in xusb-tegra186.c, but it
does not appear that drivers/phy/tegra/Makefile was updated to compile
xusb-tegra186.o when CONFIG_ARCH_TEGRA_238_SOC is set. If the other Tegra SoCs
are disabled, the object file might be omitted, leaving this symbol undefined
during linking.
> diff --git a/drivers/phy/tegra/xusb.h b/drivers/phy/tegra/xusb.h
> index d8d799d9e7522..b9de4f3b57815 100644
> --- a/drivers/phy/tegra/xusb.h
> +++ b/drivers/phy/tegra/xusb.h
[ ... ]
> @@ -514,6 +514,9 @@ extern const struct tegra_xusb_padctl_soc tegra194_xusb_padctl_soc;
> #if defined(CONFIG_ARCH_TEGRA_234_SOC)
> extern const struct tegra_xusb_padctl_soc tegra234_xusb_padctl_soc;
> #endif
> +#if defined(CONFIG_ARCH_TEGRA_238_SOC)
> +extern const struct tegra_xusb_padctl_soc tegra238_xusb_padctl_soc;
> +#endif
[Severity: Low]
Could this cause a -Wmissing-declarations warning when building
xusb-tegra186.c with CONFIG_ARCH_TEGRA_238_SOC disabled?
Since tegra238_xusb_padctl_soc is now defined and exported unconditionally in
xusb-tegra186.c, hiding its extern declaration behind this config guard will
leave the exported symbol without a visible prototype whenever the C file is
compiled for other SoCs.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261001-tegra-phy-v2-0-3e453b1fb271@nvidia.com?part=3
More information about the linux-phy
mailing list