Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 393d66fd2cac ("memory: tegra: Implement SID override programming")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20210722090748.1157470-1-arnd@kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

authored by

Arnd Bergmann and committed by
Krzysztof Kozlowski
eaf89f1c e73f0f0e

+2
+2
drivers/memory/tegra/tegra186.c
··· 71 71 return 0; 72 72 } 73 73 74 + #if IS_ENABLED(CONFIG_IOMMU_API) 74 75 static void tegra186_mc_client_sid_override(struct tegra_mc *mc, 75 76 const struct tegra_mc_client *client, 76 77 unsigned int sid) ··· 109 108 writel(sid, mc->regs + client->regs.sid.override); 110 109 } 111 110 } 111 + #endif 112 112 113 113 static int tegra186_mc_probe_device(struct tegra_mc *mc, struct device *dev) 114 114 {