[PATCH v3 3/3] phy: tegra: Add support for Tegra238 XUSB pad controller
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Wed Oct 7 07:52:57 PDT 2026
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] phy: tegra: missing declarations for exported SoC structs in xusb.h
--
commit 8acf4872f17465f59f32558aefacb7be8e2c679f
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. It populates
the Tegra238 specific SoC data, reusing structures from Tegra186 and
Tegra194, and drops the compile time guards around these shared structures in
the source file.
> diff --git a/drivers/phy/tegra/xusb-tegra186.c b/drivers/phy/tegra/xusb-tegra186.c
> index 322efdea0d807..aa8ab94fad4cf 100644
> --- a/drivers/phy/tegra/xusb-tegra186.c
> +++ b/drivers/phy/tegra/xusb-tegra186.c
[ ... ]
> @@ -1665,11 +1664,7 @@ const struct tegra_xusb_padctl_soc tegra186_xusb_padctl_soc = {
> .num_supplies = ARRAY_SIZE(tegra186_xusb_padctl_supply_names),
> };
> EXPORT_SYMBOL_GPL(tegra186_xusb_padctl_soc);
> -#endif
[Severity: Low]
Since the guards are removed here, tegra186_xusb_padctl_soc is now defined
and exported unconditionally. However, its extern declaration in
drivers/phy/tegra/xusb.h remains conditionally guarded:
#if defined(CONFIG_ARCH_TEGRA_186_SOC)
extern const struct tegra_xusb_padctl_soc tegra186_xusb_padctl_soc;
#endif
Does this cause missing declaration warnings (-Wmissing-declarations or
-Wmissing-prototypes) during the build if the kernel is configured with
CONFIG_ARCH_TEGRA_238_SOC=y but CONFIG_ARCH_TEGRA_186_SOC=n? Should the
corresponding guards in xusb.h be removed as well?
>
> -#if IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC) || \
> - IS_ENABLED(CONFIG_ARCH_TEGRA_234_SOC) || \
> - IS_ENABLED(CONFIG_ARCH_TEGRA_264_SOC)
> static const char * const tegra194_xusb_padctl_supply_names[] = {
> "avdd-usb",
> "vclamp-usb",
[Severity: Low]
A similar mismatch occurs here for tegra194_xusb_padctl_soc. The definition
is now unconditional, but the extern declaration in xusb.h is still guarded
by #if defined(CONFIG_ARCH_TEGRA_194_SOC). Could this also trigger missing
prototype warnings when building with certain configs disabled?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261007-tegra-phy-v3-0-d501de414710@nvidia.com?part=3
More information about the linux-phy
mailing list