From: "tip-bot2 for Tony Luck" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Tony Luck <tony.luck@intel.com>, Borislav Petkov <bp@suse.de>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: ras/core] RAS: Fix return value from show_trace()
Date: Mon, 31 Oct 2022 18:15:07 -0000 [thread overview]
Message-ID: <166724010782.7716.13211418678900484853.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20221018165900.109029-1-tony.luck@intel.com>
The following commit has been merged into the ras/core branch of tip:
Commit-ID: 50865c14f34edbd03f8113147fac069b39f4e390
Gitweb: https://git.kernel.org/tip/50865c14f34edbd03f8113147fac069b39f4e390
Author: Tony Luck <tony.luck@intel.com>
AuthorDate: Tue, 18 Oct 2022 09:59:00 -07:00
Committer: Borislav Petkov <bp@suse.de>
CommitterDate: Mon, 31 Oct 2022 18:55:18 +01: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
---
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 0d4f985..f0a6391 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)
prev parent reply other threads:[~2022-10-31 18:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-05 16:16 [PATCH] RAS: Fix the trace_show() function to output trace_count Tony Luck
2022-10-05 18:17 ` Borislav Petkov
2022-10-05 19:46 ` [PATCH v2] " Tony Luck
2022-10-17 10:36 ` Borislav Petkov
2022-10-17 16:09 ` Luck, Tony
2022-10-17 19:40 ` Borislav Petkov
2022-10-18 14:36 ` Tony Luck
2022-10-18 16:05 ` Borislav Petkov
2022-10-18 16:59 ` [PATCH v3] RAS: Fix return value from show_trace() Tony Luck
2022-10-31 18:15 ` tip-bot2 for Tony Luck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=166724010782.7716.13211418678900484853.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=bp@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).