diff options
author | Mark Brown <broonie@kernel.org> | 2023-06-10 17:05:54 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-06-12 16:51:07 +0300 |
commit | d32758acbd4eee8ce95b705a6760526b4d26c2aa (patch) | |
tree | 25c05a5f14e5a2514d7ff92a99fafda50cad9a33 /drivers/base/regmap/regcache.c | |
parent | bfa0b38c148379c8a8c52e23bbdcb086414fb354 (diff) | |
download | linux-d32758acbd4eee8ce95b705a6760526b4d26c2aa.tar.xz |
regmap: Don't check for changes in regcache_set_val()
The only user of regcache_set_val() ignores the return value so we may as
well not bother checking if the value we are trying to set is the same as
the value already stored.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-regcache-set-val-no-ret-v1-1-9a6932760cf8@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base/regmap/regcache.c')
-rw-r--r-- | drivers/base/regmap/regcache.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index c7d065f96a87..1f52646159df 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -558,17 +558,14 @@ void regcache_cache_bypass(struct regmap *map, bool enable) } EXPORT_SYMBOL_GPL(regcache_cache_bypass); -bool regcache_set_val(struct regmap *map, void *base, unsigned int idx, +void regcache_set_val(struct regmap *map, void *base, unsigned int idx, unsigned int val) { - if (regcache_get_val(map, base, idx) == val) - return true; - /* Use device native format if possible */ if (map->format.format_val) { map->format.format_val(base + (map->cache_word_size * idx), val, 0); - return false; + return; } switch (map->cache_word_size) { @@ -601,7 +598,6 @@ bool regcache_set_val(struct regmap *map, void *base, unsigned int idx, default: BUG(); } - return false; } unsigned int regcache_get_val(struct regmap *map, const void *base, |