[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221018165900.109029-1-tony.luck@intel.com>
Date: Tue, 18 Oct 2022 09:59:00 -0700
From: Tony Luck <tony.luck@...el.com>
To: Borislav Petkov <bp@...en8.de>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Tony Luck <tony.luck@...el.com>
Subject: [PATCH v3] 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@...el.com>
---
V3: Boris: "let's keep this effort minimal and only address valid use
cases"
---
drivers/ras/debugfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ras/debugfs.c b/drivers/ras/debugfs.c
index 0d4f985afbf3..f0a6391b1146 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)
--
2.37.3
Powered by blists - more mailing lists