]> Git Repo - linux.git/commitdiff
RAS: Fix return value from show_trace()
authorTony Luck <[email protected]>
Tue, 18 Oct 2022 16:59:00 +0000 (09:59 -0700)
committerBorislav Petkov <[email protected]>
Mon, 31 Oct 2022 17:55:18 +0000 (18:55 +0100)
Documentation/filesystems/seq_file.rst describes the possible return
values from a "show()" function used by single_open().

show_trace() returns the value of "trace_count". This could be
interpreted as "SEQ_SKIP", or just confuse the calling function.

Change to just return "0" to avoid confusing anyone reading this code
and possibly using as a template. Reading "daemon_active" was never
an intended use case.

Signed-off-by: Tony Luck <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
drivers/ras/debugfs.c

index 0d4f985afbf37f92e9f0f54531f2dd58248ee877..f0a6391b114628641b3c7eb17af0146517152acd 100644 (file)
@@ -15,7 +15,7 @@ EXPORT_SYMBOL_GPL(ras_userspace_consumers);
 
 static int trace_show(struct seq_file *m, void *v)
 {
-       return atomic_read(&trace_count);
+       return 0;
 }
 
 static int trace_open(struct inode *inode, struct file *file)
This page took 0.051181 seconds and 4 git commands to generate.