From: Gabriele Monaco <gmonaco@redhat.com>
To: Nam Cao <namcao@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/6] rv: Remove struct rv_monitor::reacting
Date: Mon, 21 Jul 2025 16:38:37 +0200 [thread overview]
Message-ID: <1d12e86b32c8c5977e5925079f6b74675a3a9e91.camel@redhat.com> (raw)
In-Reply-To: <5c18ef23f817fb653bb27f027cc1ffdf53f6e1fd.1753091084.git.namcao@linutronix.de>
On Mon, 2025-07-21 at 11:47 +0200, Nam Cao wrote:
> The field 'reacting' in struct rv_monitor is set but never used.
> Delete it.
>
> Signed-off-by: Nam Cao <namcao@linutronix.de>
> ---
Yeah seems to be the case, thanks for spotting it.
Reviewed-by: Gabriele Monaco <gmonaco@redhat.com>
> include/linux/rv.h | 1 -
> kernel/trace/rv/rv_reactors.c | 14 ++++++--------
> 2 files changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/include/linux/rv.h b/include/linux/rv.h
> index 2f867d6f72ba..80731242fe60 100644
> --- a/include/linux/rv.h
> +++ b/include/linux/rv.h
> @@ -104,7 +104,6 @@ struct rv_monitor {
> #ifdef CONFIG_RV_REACTORS
> struct rv_reactor *reactor;
> __printf(1, 2) void (*react)(const char *msg, ...);
> - bool reacting;
> #endif
> struct list_head list;
> struct rv_monitor *parent;
> diff --git a/kernel/trace/rv/rv_reactors.c
> b/kernel/trace/rv/rv_reactors.c
> index aee622e4b833..6b03f3f6ecc1 100644
> --- a/kernel/trace/rv/rv_reactors.c
> +++ b/kernel/trace/rv/rv_reactors.c
> @@ -149,7 +149,7 @@ static const struct seq_operations
> monitor_reactors_seq_ops = {
>
> static void monitor_swap_reactors_single(struct rv_monitor *mon,
> struct rv_reactor *reactor,
> - bool reacting, bool nested)
> + bool nested)
> {
> bool monitor_enabled;
>
> @@ -162,7 +162,6 @@ static void monitor_swap_reactors_single(struct
> rv_monitor *mon,
> rv_disable_monitor(mon);
>
> mon->reactor = reactor;
> - mon->reacting = reacting;
> mon->react = reactor ? reactor->react : NULL;
>
> /* enable only once if iterating through a container */
> @@ -170,8 +169,7 @@ static void monitor_swap_reactors_single(struct
> rv_monitor *mon,
> rv_enable_monitor(mon);
> }
>
> -static void monitor_swap_reactors(struct rv_monitor *mon,
> - struct rv_reactor *reactor, bool
> reacting)
> +static void monitor_swap_reactors(struct rv_monitor *mon, struct
> rv_reactor *reactor)
> {
> struct rv_monitor *p = mon;
>
> @@ -179,7 +177,7 @@ static void monitor_swap_reactors(struct
> rv_monitor *mon,
> list_for_each_entry_continue(p, &rv_monitors_list,
> list) {
> if (p->parent != mon)
> break;
> - monitor_swap_reactors_single(p, reactor,
> reacting, true);
> + monitor_swap_reactors_single(p, reactor,
> true);
> }
> /*
> * This call enables and disables the monitor if they were
> active.
> @@ -187,7 +185,7 @@ static void monitor_swap_reactors(struct
> rv_monitor *mon,
> * All nested monitors are enabled also if they were off, we
> may refine
> * this logic in the future.
> */
> - monitor_swap_reactors_single(mon, reactor, reacting, false);
> + monitor_swap_reactors_single(mon, reactor, false);
> }
>
> static ssize_t
> @@ -221,7 +219,7 @@ monitor_reactors_write(struct file *file, const
> char __user *user_buf,
>
> len = strlen(ptr);
> if (!len) {
> - monitor_swap_reactors(mon, NULL, false);
> + monitor_swap_reactors(mon, NULL);
> return count;
> }
>
> @@ -233,7 +231,7 @@ monitor_reactors_write(struct file *file, const
> char __user *user_buf,
> if (strcmp(ptr, reactor->name) != 0)
> continue;
>
> - monitor_swap_reactors(mon, reactor, true);
> + monitor_swap_reactors(mon, reactor);
>
> retval = count;
> break;
prev parent reply other threads:[~2025-07-21 14:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-21 9:47 [PATCH 0/6] rv: Clean up & simplify Nam Cao
2025-07-21 9:47 ` [PATCH 1/6] rv: Remove unused field in struct rv_monitor_def Nam Cao
2025-07-21 13:01 ` Gabriele Monaco
2025-07-21 9:47 ` [PATCH 2/6] rv: Merge struct rv_monitor_def into struct rv_monitor Nam Cao
2025-07-21 14:13 ` Gabriele Monaco
2025-07-21 9:47 ` [PATCH 3/6] rv: Merge struct rv_reactor_def into struct rv_reactor Nam Cao
2025-07-21 14:29 ` Gabriele Monaco
2025-07-21 9:47 ` [PATCH 4/6] rv: Remove rv_reactor's reference counter Nam Cao
2025-07-21 13:20 ` Gabriele Monaco
2025-07-21 14:04 ` Nam Cao
2025-07-21 15:49 ` Gabriele Monaco
2025-07-22 8:27 ` Nam Cao
2025-07-22 8:30 ` Gabriele Monaco
2025-07-21 9:47 ` [PATCH 5/6] rv: Remove the nop reactor Nam Cao
2025-07-21 10:29 ` Gabriele Monaco
2025-07-21 14:10 ` Nam Cao
2025-07-21 9:47 ` [PATCH 6/6] rv: Remove struct rv_monitor::reacting Nam Cao
2025-07-21 14:38 ` Gabriele Monaco [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=1d12e86b32c8c5977e5925079f6b74675a3a9e91.camel@redhat.com \
--to=gmonaco@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=namcao@linutronix.de \
--cc=rostedt@goodmis.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).