Input: hp_sdc_rtc - mark an unused function as __maybe_unused
authorRandy Dunlap <rdunlap@infradead.org>
Fri, 10 Feb 2023 00:44:06 +0000 (16:44 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 21 Feb 2023 21:57:40 +0000 (13:57 -0800)
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 <rdunlap@infradead.org>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20230209010125.23690-1-rdunlap@infradead.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/hp_sdc_rtc.c

index 199bc17ddb1df149cc5c65038ff3ba3440d58c2c..afc0d6dc5787ceb4300bfb7d7f9cd9f84fc9ac51 100644 (file)
@@ -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")