diff options
| author | Peng Fan <peng.fan@nxp.com> | 2026-10-02 21:11:18 +0800 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-10-06 18:08:00 +0200 |
| commit | 7ca8aa98e2ba76274b6e4e20390f740fd1207fd8 (patch) | |
| tree | 163202ff28f0a34e92fe2beb1394c464264cb8e9 /tools/perf/scripts/python | |
| parent | 81556a7aec2254ffb3a35284dad5db5d0cf2f1c7 (diff) | |
regcache: extract __regcache_sync() to deduplicate sync dispatch
regcache_sync() and regcache_sync_region() both open-code the same
pattern: check cache_dirty, then dispatch to either cache_ops->sync()
or regcache_default_sync().
Extract this into a static __regcache_sync() helper that both callers
share. The helper checks cache_dirty and returns 0 early when the
cache is clean, dispatches to the backend sync callback when present,
and falls back to regcache_default_sync() otherwise.
In regcache_sync_region(), the cache_dirty early-exit previously
skipped setting map->async. With the helper, map->async is set to
true before the call and restored to false unconditionally afterward,
so when cache_dirty is false the flag is toggled and immediately
restored - functionally equivalent.
No functional change.
Assisted-by: LLM
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://patch.msgid.link/20261002-regmap-lock-2nd-v2-2-e172b0501c52@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
