Skip to contentSkip to conversation

nfc: trf7970a: mark OF related data as maybe unused

PATCH Applied Krzysztof Kozlowski 4 participants 4 messages Mar 11, 2023 – Mar 15, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfc: trf7970a: mark OF related data as maybe unused

The driver can be compile tested with !CONFIG_OF making certain data unused:

drivers/nfc/trf7970a.c:2232:34: error: ‘trf7970a_of_match’ defined but not used [-Werror=unused-const-variable=]

---
 drivers/nfc/trf7970a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nfc/trf7970a.c +1 -1
index 21d68664fe08..7eb17f46a815 100644
@@ -2229,7 +2229,7 @@ static const struct dev_pm_ops trf7970a_pm_ops = {
 			   trf7970a_pm_runtime_resume, NULL)
 };
 
-static const struct of_device_id trf7970a_of_match[] = {
+static const struct of_device_id trf7970a_of_match[] __maybe_unused = {
 	{.compatible = "ti,trf7970a",},
 	{},
 };
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Krzysztof Kozlowski
Quoted 25 lines · Krzysztof Kozlowski

The driver can be compile tested with !CONFIG_OF making certain data unused:

drivers/nfc/trf7970a.c:2232:34: error: ‘trf7970a_of_match’ defined but not used [-Werror=unused-const-variable=]

---
 drivers/nfc/trf7970a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nfc/trf7970a.c +1 -1
index 21d68664fe08..7eb17f46a815 100644
@@ -2229,7 +2229,7 @@ static const struct dev_pm_ops trf7970a_pm_ops = {
 			   trf7970a_pm_runtime_resume, NULL)
 };
 
-static const struct of_device_id trf7970a_of_match[] = {
+static const struct of_device_id trf7970a_of_match[] __maybe_unused = {
 	{.compatible = "ti,trf7970a",},
 	{},
 };
Signature · 1 line
2.34.1
#3 lore raw
In reply to Krzysztof Kozlowski
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Quoted 8 lines · On Sat, 11 Mar 2023 12:13:28 +0100 you wrote:

The driver can be compile tested with !CONFIG_OF making certain data unused:

drivers/nfc/trf7970a.c:2232:34: error: ‘trf7970a_of_match’ defined but not used [-Werror=unused-const-variable=]

[...]

Here is the summary with links:
- nfc: trf7970a: mark OF related data as maybe unused

    https://git.kernel.org/netdev/net-next/c/a52ed50a04de

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html