input/misc: hp_sdc_rtc: mark an unused function as __maybe_unused
Subsystems (3)
PATCH 1/1 input/misc: 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)
| ^~~~~~~~~~~~~~~~~~~~
--- drivers/input/misc/hp_sdc_rtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/misc/hp_sdc_rtc.c +1 -1
@@ -265,7 +265,7 @@ static inline int hp_sdc_rtc_read_ct(strreturn 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")
Quoted 10 lines · Randy Dunlap
When
CONFIG_PROC_FSis not set, one procfs-related function is not used, causing a build error or warning.
Mark this function as__maybe_unusedto 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 inthp_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 <[email protected]>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 5 lines · Geert Uytterhoeven
Quoted 4 lines · Randy Dunlap
When
CONFIG_PROC_FSis not set, one procfs-related function is not used, causing a build error or warning.
Mark this function as__maybe_unusedto quieten the build.
Quoted 8 lines
Quoted 6 lines
../drivers/input/misc/hp_sdc_rtc.c:268:12: warning: 'hp_sdc_rtc_proc_show' defined but not used [-Wunused-function]
268 | static inthp_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 <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>
applied to parisc tree.
Thanks,
Helge