Skip to content

Commit 50865c1

Browse files
aeglsuryasaimadhu
authored andcommitted
RAS: Fix return value from show_trace()
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]
1 parent a51cbd0 commit 50865c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ras/debugfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ EXPORT_SYMBOL_GPL(ras_userspace_consumers);
1515

1616
static int trace_show(struct seq_file *m, void *v)
1717
{
18-
return atomic_read(&trace_count);
18+
return 0;
1919
}
2020

2121
static int trace_open(struct inode *inode, struct file *file)

0 commit comments

Comments
 (0)