[PATCH v1 11/19] RAS: Remove unused ras_userspace_consumers()

From: Pierre Gondois

Date: Tue Nov 17 2026 - 06:19:47 EST


Remove the unused ras_userspace_consumers() and atomic
trace_count as the previous patch made extlog select
CPER console output by severity.

Signed-off-by: Pierre Gondois <pierre.gondois@xxxxxxx>
---
drivers/ras/debugfs.c | 10 ----------
include/linux/ras.h | 2 --
2 files changed, 12 deletions(-)

diff --git a/drivers/ras/debugfs.c b/drivers/ras/debugfs.c
index 42afd3de68b22..838cc689b9989 100644
--- a/drivers/ras/debugfs.c
+++ b/drivers/ras/debugfs.c
@@ -5,20 +5,12 @@

static struct dentry *ras_debugfs_dir;

-static atomic_t trace_count = ATOMIC_INIT(0);
-
struct dentry *ras_get_debugfs_root(void)
{
return ras_debugfs_dir;
}
EXPORT_SYMBOL_GPL(ras_get_debugfs_root);

-int ras_userspace_consumers(void)
-{
- return atomic_read(&trace_count);
-}
-EXPORT_SYMBOL_GPL(ras_userspace_consumers);
-
static int trace_show(struct seq_file *m, void *v)
{
return 0;
@@ -26,13 +18,11 @@ static int trace_show(struct seq_file *m, void *v)

static int trace_open(struct inode *inode, struct file *file)
{
- atomic_inc(&trace_count);
return single_open(file, trace_show, NULL);
}

static int trace_release(struct inode *inode, struct file *file)
{
- atomic_dec(&trace_count);
return single_release(inode, file);
}

diff --git a/include/linux/ras.h b/include/linux/ras.h
index 468941bfe855f..3159f9a0877ed 100644
--- a/include/linux/ras.h
+++ b/include/linux/ras.h
@@ -7,11 +7,9 @@
#include <linux/cper.h>

#ifdef CONFIG_DEBUG_FS
-int ras_userspace_consumers(void);
void ras_debugfs_init(void);
int ras_add_daemon_trace(void);
#else
-static inline int ras_userspace_consumers(void) { return 0; }
static inline void ras_debugfs_init(void) { }
static inline int ras_add_daemon_trace(void) { return 0; }
#endif
--
2.43.0