Skip to content

Commit eaf89f1

Browse files
arndbkrzk
authored andcommitted
memory: tegra: fix unused-function warning
The tegra186_mc_client_sid_override() is only called from an #ifdef block: drivers/memory/tegra/tegra186.c:74:13: error: 'tegra186_mc_client_sid_override' defined but not used [-Werror=unused-function] 74 | static void tegra186_mc_client_sid_override(struct tegra_mc *mc, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add another #ifdef around the called function. Fixes: 393d66f ("memory: tegra: Implement SID override programming") Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Jon Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Krzysztof Kozlowski <[email protected]>
1 parent e73f0f0 commit eaf89f1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/memory/tegra/tegra186.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ static int tegra186_mc_resume(struct tegra_mc *mc)
7171
return 0;
7272
}
7373

74+
#if IS_ENABLED(CONFIG_IOMMU_API)
7475
static void tegra186_mc_client_sid_override(struct tegra_mc *mc,
7576
const struct tegra_mc_client *client,
7677
unsigned int sid)
@@ -108,6 +109,7 @@ static void tegra186_mc_client_sid_override(struct tegra_mc *mc,
108109
writel(sid, mc->regs + client->regs.sid.override);
109110
}
110111
}
112+
#endif
111113

112114
static int tegra186_mc_probe_device(struct tegra_mc *mc, struct device *dev)
113115
{

0 commit comments

Comments
 (0)