[PATCH 2/3] ARM: rpc: ecard: fix unused-function warning
Arnd Bergmann
arnd at kernel.org
Mon Oct 18 07:02:17 PDT 2021
From: Arnd Bergmann <arnd at arndb.de>
When CONFIG_PROC_FS is disabled, gcc warns about an
unused function:
arch/arm/mach-rpc/ecard.c:650:12: error: unused function 'ecard_devices_proc_show' [-Werror,-Wunused-function]
Mark it as __maybe_unused to avoid adding an extra #ifdef.
Signed-off-by: Arnd Bergmann <arnd at arndb.de>
---
arch/arm/mach-rpc/ecard.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-rpc/ecard.c b/arch/arm/mach-rpc/ecard.c
index 27df70013569..864b251282af 100644
--- a/arch/arm/mach-rpc/ecard.c
+++ b/arch/arm/mach-rpc/ecard.c
@@ -647,7 +647,7 @@ static int ecard_prints(struct seq_file *m, ecard_t *ec)
return 0;
}
-static int ecard_devices_proc_show(struct seq_file *m, void *v)
+static int __maybe_unused ecard_devices_proc_show(struct seq_file *m, void *v)
{
ecard_t *ec = cards;
--
2.29.2
More information about the linux-arm-kernel
mailing list