diff options
| author | Hugo Villeneuve <[email protected]> | 2023-12-11 12:13:48 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2023-12-15 14:20:27 +0100 |
| commit | 6bcab3c8acc88e265c570dea969fd04f137c8a4c (patch) | |
| tree | 1350d42ff4c2a7d47a675a5a403ca500311ee9cf /tools/perf/scripts/python/flamegraph.py | |
| parent | 96d7e361ca4cb0e8b6fa0635a04609b6367257e6 (diff) | |
serial: sc16is7xx: remove wasteful static buffer in sc16is7xx_regmap_name()
Using a static buffer inside sc16is7xx_regmap_name() was a convenient and
simple way to set the regmap name without having to allocate and free a
buffer each time it is called. The drawback is that the static buffer
wastes memory for nothing once regmap is fully initialized.
Remove static buffer and use constant strings instead.
This also avoids a truncation warning when using "%d" or "%u" in snprintf
which was flagged by kernel test robot.
Fixes: 3837a0379533 ("serial: sc16is7xx: improve regmap debugfs by using one regmap per port")
Cc: <[email protected]> # 6.1.x: 3837a03 serial: sc16is7xx: improve regmap debugfs by using one regmap per port
Suggested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Hugo Villeneuve <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions