Re: [PATCH RFC 2/4] regcache: use the regmap scoped lock guard
From: Mark Brown
Date: Mon Sep 21 2026 - 05:20:40 EST
On Mon, Sep 21, 2026 at 02:03:34PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@xxxxxxx>
>
> 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, ...) where the locked region is a subsection of
> @@ -432,73 +428,69 @@ int regcache_sync(struct regmap *map)
> + for (i = 0; i < map->patch_regs; i++) {
> + sync_ret = _regmap_write(map, map->patch[i].reg, map->patch[i].def);
> + if (sync_ret != 0) {
> + dev_err(map->dev, "Failed to write %x = %x: %d\n",
> + map->patch[i].reg, map->patch[i].def, sync_ret);
> + goto out;
> + }
> }
This has the mixing scoped guard and goto thing I keep raising.
Attachment:
signature.asc
Description: PGP signature