Thread (5 messages) 5 messages, 3 authors, 2025-09-12

Re: [PATCH] coresight: trbe: Use scope-based resource management in arm_trbe_alloc_buffer()

From: Markus Elfring <hidden>
Date: 2025-09-12 06:00:35
Also in: kernel-janitors, lkml

quoted
Scope-based resource management became supported for some
programming interfaces by contributions of Peter Zijlstra on 2023-05-26.
See also the commit 54da6a0924311c7cf5015533991e44fb8eb12773 ("locking:
			^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

SHA ID here just needs first 12 digits not the entire string.
See also once more:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.17-rc5#n109

quoted
Introduce __cleanup() based infrastructure").

* Thus use the attribute “__free(kfree)”.

* Reduce the scopes for the local variables “buf” and “pglist”.
What is that required ?
The needed variables should be defined in a succinct way.

quoted
* Omit four kfree() calls accordingly.
Right.

The commit message should be re-written with little more
context from arm_trbe_alloc_buffer(), after describing
the new scope-based resource management.
Which background information do you miss so far?

Regards,
Markus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help