summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_files.py
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2025-05-27 14:52:16 -0400
committerSteven Rostedt (Google) <rostedt@goodmis.org>2025-05-29 08:24:07 -0400
commitb2e7c6ed26e90fab1e5e626071e54e3b9ec9cb5a (patch)
treec5ce241908622a1e2ede69d3e0db55605d5f9f95 /scripts/lib/kdoc/kdoc_files.py
parentf0d8cbc8ccc6299046ceb5023a2af9e2b75c4106 (diff)
ring-buffer: Simplify ring_buffer_read_page() with guard()
The function ring_buffer_read_page() had two gotos. One was simply returning "ret" and the other was unlocking the reader_lock. There's no reason to use goto to simply return the "ret" variable. Instead just return the value. The jump to the unlocking of the reader_lock can be replaced by guard(raw_spinlock_irqsave)(&cpu_buffer->reader_lock). With these two changes the "ret" variable is no longer used and can be removed. The return value on non-error is what was read and is stored in the "read" variable. Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/20250527145216.0187cf36@gandalf.local.home Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions