]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tracing: Switch trace_osnoise.c code over to use guard() and __free()
authorSteven Rostedt <rostedt@goodmis.org>
Wed, 25 Dec 2024 22:25:41 +0000 (17:25 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 26 Dec 2024 15:38:37 +0000 (10:38 -0500)
commit930d2b32c0af6895ba4c6ca6404e7f7b6dc214ed
treebe4c455e0bdad0af7cc922019911c733b72bc85e
parenta2e27e1bb19eb7c1790af7c8b6f7298ec524c1bb
tracing: Switch trace_osnoise.c code over to use guard() and __free()

The osnoise_hotplug_workfn() grabs two mutexes and cpu_read_lock(). It has
various gotos to handle unlocking them. Switch them over to guard() and
let the compiler worry about it.

The osnoise_cpus_read() has a temporary mask_str allocated and there's
some gotos to make sure it gets freed on error paths. Switch that over to
__free() to let the compiler worry about it.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/20241225222931.517329690@goodmis.org
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_osnoise.c