linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] trace/osnoise: Rename main variable to tracer_main
@ 2021-08-03  8:28 Daniel Bristot de Oliveira
  2021-08-03 14:31 ` Randy Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Bristot de Oliveira @ 2021-08-03  8:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Daniel Bristot de Oliveira, Randy Dunlap, Matthew Wilcox,
	Steven Rostedt, Ingo Molnar

The *main variable in start_kthread() is causing warnings in some
compilers/analyzers. Although it is not necessarily a problem, it is
not a problem changing the variable name too.

Rename the *main variable to *tracer_main.

No functional change.

Fixes: c8895e271f79 ("trace/osnoise: Support hotplug operations")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
---
 kernel/trace/trace_osnoise.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
index 0b11db9595b6..eda10d39da47 100644
--- a/kernel/trace/trace_osnoise.c
+++ b/kernel/trace/trace_osnoise.c
@@ -1576,20 +1576,20 @@ static void stop_per_cpu_kthreads(void)
 static int start_kthread(unsigned int cpu)
 {
 	struct task_struct *kthread;
-	void *main = osnoise_main;
+	void *tracer_main = osnoise_main;
 	char comm[24];
 
 #ifdef CONFIG_TIMERLAT_TRACER
 	if (osnoise_data.timerlat_tracer) {
 		snprintf(comm, 24, "timerlat/%d", cpu);
-		main = timerlat_main;
+		tracer_main = timerlat_main;
 	} else {
 		snprintf(comm, 24, "osnoise/%d", cpu);
 	}
 #else
 	snprintf(comm, 24, "osnoise/%d", cpu);
 #endif
-	kthread = kthread_create_on_cpu(main, NULL, cpu, comm);
+	kthread = kthread_create_on_cpu(tracer_main, NULL, cpu, comm);
 
 	if (IS_ERR(kthread)) {
 		pr_err(BANNER "could not start sampling thread\n");
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-03 14:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-03  8:28 [PATCH] trace/osnoise: Rename main variable to tracer_main Daniel Bristot de Oliveira
2021-08-03 14:31 ` Randy Dunlap

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).