* [PATCH] ia64: salinfo: placate defined-but-not-used warning
@ 2023-02-23 3:43 Randy Dunlap
0 siblings, 0 replies; only message in thread
From: Randy Dunlap @ 2023-02-23 3:43 UTC (permalink / raw)
To: linux-kernel; +Cc: Randy Dunlap, Andrew Morton, Christoph Hellwig, linux-ia64
When CONFIG_PROC_FS is not set, proc_salinfo_show() is not used.
Mark the function as __maybe_unused to quieten the warning message.
../arch/ia64/kernel/salinfo.c:584:12: warning: 'proc_salinfo_show' defined but not used [-Wunused-function]
584 | static int proc_salinfo_show(struct seq_file *m, void *v)
| ^~~~~~~~~~~~~~~~~
Fixes: 3f3942aca6da ("proc: introduce proc_create_single{,_data}")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: linux-ia64@vger.kernel.org
---
The entire salinfo.c file looks like it should be conditional on
CONFIG_PROC_FS, but I'm just addressing warnings/errors here.
arch/ia64/kernel/salinfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -- a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c
--- a/arch/ia64/kernel/salinfo.c
+++ b/arch/ia64/kernel/salinfo.c
@@ -581,7 +581,7 @@ static int salinfo_cpu_pre_down(unsigned
* 'data' contains an integer that corresponds to the feature we're
* testing
*/
-static int proc_salinfo_show(struct seq_file *m, void *v)
+static int __maybe_unused proc_salinfo_show(struct seq_file *m, void *v)
{
unsigned long data = (unsigned long)v;
seq_puts(m, (sal_platform_features & data) ? "1\n" : "0\n");
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-23 3:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-23 3:43 [PATCH] ia64: salinfo: placate defined-but-not-used warning Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®