From: Tony Luck Date: Tue, 18 Oct 2022 16:59:00 +0000 (-0700) Subject: RAS: Fix return value from show_trace() X-Git-Tag: v6.2-rc1~179^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=50865c14f34edbd03f8113147fac069b39f4e390;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221018165900.109029-1-tony.luck@intel.com --- diff --git a/drivers/ras/debugfs.c b/drivers/ras/debugfs.c index 0d4f985afbf37..f0a6391b11462 100644 --- a/drivers/ras/debugfs.c +++ b/drivers/ras/debugfs.c @@ -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)