From 586dc36226dd748b197eea8642c087cae611129b Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Thu, 9 Feb 2023 16:44:06 -0800 Subject: [PATCH] Input: hp_sdc_rtc - mark an unused function as __maybe_unused When CONFIG_PROC_FS is not set, one procfs-related function is not used, causing a build error or warning. Mark this function as __maybe_unused to quieten the build. ../drivers/input/misc/hp_sdc_rtc.c:268:12: warning: 'hp_sdc_rtc_proc_show' defined but not used [-Wunused-function] 268 | static int hp_sdc_rtc_proc_show(struct seq_file *m, void *v) | ^~~~~~~~~~~~~~~~~~~~ Fixes: c18bd9a1ff47 ("hp_sdc_rtc: Don't use create_proc_read_entry()") Signed-off-by: Randy Dunlap Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230209010125.23690-1-rdunlap@infradead.org Signed-off-by: Dmitry Torokhov --- drivers/input/misc/hp_sdc_rtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c index 199bc17ddb1d..afc0d6dc5787 100644 --- a/drivers/input/misc/hp_sdc_rtc.c +++ b/drivers/input/misc/hp_sdc_rtc.c @@ -265,7 +265,7 @@ static inline int hp_sdc_rtc_read_ct(struct timespec64 *res) { return 0; } -static int hp_sdc_rtc_proc_show(struct seq_file *m, void *v) +static int __maybe_unused hp_sdc_rtc_proc_show(struct seq_file *m, void *v) { #define YN(bit) ("no") #define NY(bit) ("yes")