* [PATCH] input/misc: hp_sdc_rtc: mark an unused function as __maybe_unused
@ 2023-02-09 1:01 Randy Dunlap
2023-02-09 13:56 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2023-02-09 1:01 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, David Howells, Helge Deller, linux-m68k,
James E.J. Bottomley, linux-parisc, Al Viro, Dmitry Torokhov,
linux-input
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>
Cc: David Howells <dhowells@redhat.com>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-m68k@lists.linux-m68k.org
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: linux-parisc@vger.kernel.org
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
---
drivers/input/misc/hp_sdc_rtc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -- a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c
--- 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(str
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")
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] input/misc: hp_sdc_rtc: mark an unused function as __maybe_unused
2023-02-09 1:01 [PATCH] input/misc: hp_sdc_rtc: mark an unused function as __maybe_unused Randy Dunlap
@ 2023-02-09 13:56 ` Geert Uytterhoeven
2023-02-28 18:39 ` Helge Deller
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2023-02-09 13:56 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, David Howells, Helge Deller, linux-m68k,
James E.J. Bottomley, linux-parisc, Al Viro, Dmitry Torokhov,
linux-input
On Thu, Feb 9, 2023 at 2:04 AM Randy Dunlap <rdunlap@infradead.org> wrote:
> 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>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] input/misc: hp_sdc_rtc: mark an unused function as __maybe_unused
2023-02-09 13:56 ` Geert Uytterhoeven
@ 2023-02-28 18:39 ` Helge Deller
0 siblings, 0 replies; 3+ messages in thread
From: Helge Deller @ 2023-02-28 18:39 UTC (permalink / raw)
To: Geert Uytterhoeven, Randy Dunlap
Cc: linux-kernel, David Howells, linux-m68k, James E.J. Bottomley,
linux-parisc, Al Viro, Dmitry Torokhov, linux-input
On 2/9/23 14:56, Geert Uytterhoeven wrote:
> On Thu, Feb 9, 2023 at 2:04 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>> 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>
applied to parisc tree.
Thanks,
Helge
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-28 18:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-09 1:01 [PATCH] input/misc: hp_sdc_rtc: mark an unused function as __maybe_unused Randy Dunlap
2023-02-09 13:56 ` Geert Uytterhoeven
2023-02-28 18:39 ` Helge Deller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).