mirror of
https://github.com/torvalds/linux
synced 2024-09-06 18:01:05 +00:00
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 <tony.luck@intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lore.kernel.org/r/20221018165900.109029-1-tony.luck@intel.com
This commit is contained in:
parent
a51cbd0d86
commit
50865c14f3
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue