(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

regcache: simplify control flow and reduce nesting

Move the count guard into regcache_hw_init() so callers don't need to check before calling, and flatten conditional blocks that wrap a single call by using early returns instead. Merge the two separate reg_defaults / num_reg_defaults sanity checks into a single expression, and drop unnecessary else-after-return in regcache_lookup_reg() and regcache_sync_block(). 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-3-e172b0501c52@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>


Author Peng Fan Committer Mark Brown Date Commit Parent 7ca8aa98
+22 -28
1 changed file
+22 -28
1 changed file