[PATCH] regmap: Handle sparse caches in the default sync

Mark Brown posted 1 patch 2 years, 10 months ago
drivers/base/regmap/regcache.c | 2 ++
1 file changed, 2 insertions(+)
[PATCH] regmap: Handle sparse caches in the default sync
Posted by Mark Brown 2 years, 10 months ago
If there is no cache entry available we will get -ENOENT from the cache
implementation, handle this gracefully and skip rather than treating it as
an error.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/base/regmap/regcache.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index 362e043e26d8..c1b020c5a6a9 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -311,6 +311,8 @@ static int regcache_default_sync(struct regmap *map, unsigned int min,
 			continue;
 
 		ret = regcache_read(map, reg, &val);
+		if (ret == -ENOENT)
+			continue;
 		if (ret)
 			return ret;
 

---
base-commit: e8d018dd0257f744ca50a729e3d042cf2ec9da65
change-id: 20230325-regcache-sparse-sync-5d4c939a79b3

Best regards,
-- 
Mark Brown <broonie@kernel.org>
Re: [PATCH] regmap: Handle sparse caches in the default sync
Posted by Mark Brown 2 years, 10 months ago
On Sat, 25 Mar 2023 21:49:49 +0000, Mark Brown wrote:
> If there is no cache entry available we will get -ENOENT from the cache
> implementation, handle this gracefully and skip rather than treating it as
> an error.
> 
> 

Applied to

   broonie/regmap.git for-next

Thanks!

[1/1] regmap: Handle sparse caches in the default sync
      commit: 2c89db8f8d1e544fd817d4c0dc508a00b78a8f7f

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark