diff options
| author | Peng Fan <peng.fan@nxp.com> | 2026-09-24 14:30:53 +0800 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-09-28 19:49:37 +0100 |
| commit | 23f1120dcbea0089b63f2e4afd671b4b012864cb (patch) | |
| tree | 7c61254f68b8f43664f98c5c0a437a62fe1e5ca4 /tools/perf/scripts/python/task-analyzer.py | |
| parent | 80328b41ea2887229fbdc1bd03357ae0a9fa43f2 (diff) | |
regcache: use the regmap scoped lock guard
Convert the open-coded map->lock()/map->unlock() users in regcache.c
to the regmap scoped guard introduced for regmap.c. Use
scoped_guard(regmap, ...) in regcache_exit(), where the locked region
is a subsection of the function, and guard(regmap)() for the
function-scope critical sections.
regcache_init() keeps explicit map->lock()/map->unlock() calls: it
has a goto err_* cleanup ladder and mixing goto with cleanup helpers
in the same function is not allowed by cleanup.h.
regcache_sync() and regcache_sync_region() are left as-is: they
already use a single goto out unlock path, so converting them would
require either mixing a goto with a scoped_guard scope or restructuring
their control flow, neither of which is an improvement.
No functional change.
Assisted-by: LLM
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://patch.msgid.link/20260924-regmap-lock-guard-v3-2-8a6127223c16@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
