Skip to content

Commit b8a7fba

Browse files
covanamrostedt
authored andcommitted
rv: Remove struct rv_monitor::reacting
The field 'reacting' in struct rv_monitor is set but never used. Delete it. Cc: Masami Hiramatsu <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Link: https://lore.kernel.org/a6c16f845d2f1a09c4d0934ab83f3cb14478a71d.1753378331.git.namcao@linutronix.de Reviewed-by: Gabriele Monaco <[email protected]> Signed-off-by: Nam Cao <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 3d3800b commit b8a7fba

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

include/linux/rv.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ struct rv_monitor {
104104
#ifdef CONFIG_RV_REACTORS
105105
struct rv_reactor *reactor;
106106
__printf(1, 2) void (*react)(const char *msg, ...);
107-
bool reacting;
108107
#endif
109108
struct list_head list;
110109
struct rv_monitor *parent;

kernel/trace/rv/rv_reactors.c

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ static const struct seq_operations monitor_reactors_seq_ops = {
160160

161161
static void monitor_swap_reactors_single(struct rv_monitor *mon,
162162
struct rv_reactor *reactor,
163-
bool reacting, bool nested)
163+
bool nested)
164164
{
165165
bool monitor_enabled;
166166

@@ -173,32 +173,30 @@ static void monitor_swap_reactors_single(struct rv_monitor *mon,
173173
rv_disable_monitor(mon);
174174

175175
mon->reactor = reactor;
176-
mon->reacting = reacting;
177176
mon->react = reactor->react;
178177

179178
/* enable only once if iterating through a container */
180179
if (monitor_enabled && !nested)
181180
rv_enable_monitor(mon);
182181
}
183182

184-
static void monitor_swap_reactors(struct rv_monitor *mon,
185-
struct rv_reactor *reactor, bool reacting)
183+
static void monitor_swap_reactors(struct rv_monitor *mon, struct rv_reactor *reactor)
186184
{
187185
struct rv_monitor *p = mon;
188186

189187
if (rv_is_container_monitor(mon))
190188
list_for_each_entry_continue(p, &rv_monitors_list, list) {
191189
if (p->parent != mon)
192190
break;
193-
monitor_swap_reactors_single(p, reactor, reacting, true);
191+
monitor_swap_reactors_single(p, reactor, true);
194192
}
195193
/*
196194
* This call enables and disables the monitor if they were active.
197195
* In case of a container, we already disabled all and will enable all.
198196
* All nested monitors are enabled also if they were off, we may refine
199197
* this logic in the future.
200198
*/
201-
monitor_swap_reactors_single(mon, reactor, reacting, false);
199+
monitor_swap_reactors_single(mon, reactor, false);
202200
}
203201

204202
static ssize_t
@@ -210,7 +208,6 @@ monitor_reactors_write(struct file *file, const char __user *user_buf,
210208
struct rv_reactor *reactor;
211209
struct seq_file *seq_f;
212210
int retval = -EINVAL;
213-
bool enable;
214211
char *ptr;
215212
int len;
216213

@@ -243,12 +240,7 @@ monitor_reactors_write(struct file *file, const char __user *user_buf,
243240
if (strcmp(ptr, reactor->name) != 0)
244241
continue;
245242

246-
if (strcmp(reactor->name, "nop"))
247-
enable = false;
248-
else
249-
enable = true;
250-
251-
monitor_swap_reactors(mon, reactor, enable);
243+
monitor_swap_reactors(mon, reactor);
252244

253245
retval = count;
254246
break;
@@ -439,7 +431,6 @@ int reactor_populate_monitor(struct rv_monitor *mon)
439431
* Configure as the rv_nop reactor.
440432
*/
441433
mon->reactor = get_reactor_rdef_by_name("nop");
442-
mon->reacting = false;
443434

444435
return 0;
445436
}

0 commit comments

Comments
 (0)