diff options
| author | Günther Noack <gnoack@google.com> | 2026-02-19 16:43:35 +0100 |
|---|---|---|
| committer | Benjamin Tissoires <bentiss@kernel.org> | 2026-02-19 18:57:38 +0100 |
| commit | 6b3e458806e34f1142592f786d3eb0ebac209cc2 (patch) | |
| tree | 79fa16dfd8d9de7200f85d81326eb434f982437e /tools/perf/scripts/python/flamegraph.py | |
| parent | f50822fd8675c68d294e89bd102f7b487ca3acd3 (diff) | |
| download | linux-6b3e458806e34f1142592f786d3eb0ebac209cc2.tar.gz linux-6b3e458806e34f1142592f786d3eb0ebac209cc2.zip | |
HID: Document memory allocation properties of report_fixup()
The memory pointer returned by the report_fixup() hook does not get
freed by the caller. Instead, report_fixup() must return (in return
value and *rsize) a memory buffer with at least the same lifetime as
the input buffer (defined by rdesc and original *rsize).
This is usually achieved using one of the following techniques:
* Returning a pointer and size to a sub-portion of the input buffer
* Returning a pointer to a static buffer
* Allocating a buffer with a devm_*() function,
which will automatically get freed when the device is removed.
Signed-off-by: Günther Noack <gnoack@google.com>
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
