LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] memory: tegra: fix unused-function warning
@ 2021-07-22 9:07 Arnd Bergmann
2021-07-22 17:22 ` Jon Hunter
2021-07-23 6:27 ` Krzysztof Kozlowski
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2021-07-22 9:07 UTC (permalink / raw)
To: Krzysztof Kozlowski, Thierry Reding, Jonathan Hunter
Cc: Arnd Bergmann, linux-kernel, linux-tegra
From: Arnd Bergmann <arnd@arndb.de>
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>
---
drivers/memory/tegra/tegra186.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/memory/tegra/tegra186.c b/drivers/memory/tegra/tegra186.c
index e65eac5764d4..3d153881abc1 100644
--- a/drivers/memory/tegra/tegra186.c
+++ b/drivers/memory/tegra/tegra186.c
@@ -71,6 +71,7 @@ static int tegra186_mc_resume(struct tegra_mc *mc)
return 0;
}
+#if IS_ENABLED(CONFIG_IOMMU_API)
static void tegra186_mc_client_sid_override(struct tegra_mc *mc,
const struct tegra_mc_client *client,
unsigned int sid)
@@ -108,6 +109,7 @@ static void tegra186_mc_client_sid_override(struct tegra_mc *mc,
writel(sid, mc->regs + client->regs.sid.override);
}
}
+#endif
static int tegra186_mc_probe_device(struct tegra_mc *mc, struct device *dev)
{
--
2.29.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] memory: tegra: fix unused-function warning
2021-07-22 9:07 [PATCH] memory: tegra: fix unused-function warning Arnd Bergmann
@ 2021-07-22 17:22 ` Jon Hunter
2021-07-23 6:27 ` Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: Jon Hunter @ 2021-07-22 17:22 UTC (permalink / raw)
To: Arnd Bergmann, Krzysztof Kozlowski, Thierry Reding
Cc: Arnd Bergmann, linux-kernel, linux-tegra
On 22/07/2021 10:07, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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>
> ---
> drivers/memory/tegra/tegra186.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/memory/tegra/tegra186.c b/drivers/memory/tegra/tegra186.c
> index e65eac5764d4..3d153881abc1 100644
> --- a/drivers/memory/tegra/tegra186.c
> +++ b/drivers/memory/tegra/tegra186.c
> @@ -71,6 +71,7 @@ static int tegra186_mc_resume(struct tegra_mc *mc)
> return 0;
> }
>
> +#if IS_ENABLED(CONFIG_IOMMU_API)
> static void tegra186_mc_client_sid_override(struct tegra_mc *mc,
> const struct tegra_mc_client *client,
> unsigned int sid)
> @@ -108,6 +109,7 @@ static void tegra186_mc_client_sid_override(struct tegra_mc *mc,
> writel(sid, mc->regs + client->regs.sid.override);
> }
> }
> +#endif
>
> static int tegra186_mc_probe_device(struct tegra_mc *mc, struct device *dev)
> {
>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Thanks for fixing!
Jon
--
nvpublic
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] memory: tegra: fix unused-function warning
2021-07-22 9:07 [PATCH] memory: tegra: fix unused-function warning Arnd Bergmann
2021-07-22 17:22 ` Jon Hunter
@ 2021-07-23 6:27 ` Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2021-07-23 6:27 UTC (permalink / raw)
To: Jonathan Hunter, Arnd Bergmann, Thierry Reding
Cc: Krzysztof Kozlowski, linux-tegra, Arnd Bergmann, linux-kernel
On Thu, 22 Jul 2021 11:07:43 +0200, Arnd Bergmann wrote:
> 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,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> [...]
Applied, thanks!
[1/1] memory: tegra: fix unused-function warning
commit: eaf89f1cd38cf7256ab64424fe94014632044d57
Best regards,
--
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-23 6:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-22 9:07 [PATCH] memory: tegra: fix unused-function warning Arnd Bergmann
2021-07-22 17:22 ` Jon Hunter
2021-07-23 6:27 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).