diff options
author | 2025-05-27 14:31:44 -0400 | |
---|---|---|
committer | 2025-05-29 08:24:08 -0400 | |
commit | 99d232804405e35d7a9af1536a057578a1442e81 (patch) | |
tree | cb24e64a056ccfad4545e94acf4964bec16689ca /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | ring-buffer: Make ring_buffer_{un}map() simpler with guard(mutex) (diff) | |
download | linux-rng-99d232804405e35d7a9af1536a057578a1442e81.tar.xz linux-rng-99d232804405e35d7a9af1536a057578a1442e81.zip |
ring-buffer: Simplify functions with __free(kfree) to free allocations
The function rb_allocate_pages() allocates cpu_buffer and on error needs
to free it. It has a single return. Use __free(kfree) and return directly
on errors and have the return use return_ptr(cpu_buffer).
The function alloc_buffer() allocates buffer and on error needs to free
it. It has a single return. Use __free(kfree) and return directly on
errors and have the return use return_ptr(buffer).
The function __rb_map_vma() allocates a temporary array "pages". Have it
use __free() and not worry about freeing it when returning.
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/20250527143144.6edc4625@gandalf.local.home
Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions