regcache: Make ->exit() callback return void
Subsystems (2)
PATCH 1/1 regcache: Make ->exit() callback return void
We do not check an error code from ->exit() callback, nor we ever return one (it's always 0, meaning success). Make ->exit() callback return void.
---
This depends on recently accepted fix that dropped the returned value checks for ->exit() callback.
drivers/base/regmap/internal.h | 2 +- drivers/base/regmap/regcache-flat.c | 4 +--- drivers/base/regmap/regcache-maple.c | 6 ++---- drivers/base/regmap/regcache-rbtree.c | 8 +++----- 4 files changed, 7 insertions(+), 13 deletions(-)
drivers/base/regmap/internal.h +1 -1
@@ -189,7 +189,7 @@ struct regcache_ops {const char *name;enum regcache_type type;int (*init)(struct regmap *map); -int (*exit)(struct regmap *map); +void (*exit)(struct regmap *map);int (*populate)(struct regmap *map);#ifdef CONFIG_DEBUG_FS void (*debugfs_init)(struct regmap *map);
drivers/base/regmap/regcache-flat.c +1 -3
@@ -53,7 +53,7 @@ static int regcache_flat_init(struct regmap *map)return -ENOMEM ; } -static int regcache_flat_exit (struct regmap *map) +static void regcache_flat_exit (struct regmap *map) {struct regcache_flat_data *cache = map->cache;
@@ -62,8 +62,6 @@ static int regcache_flat_exit(struct regmap *map)kfree (cache); map->cache =NULL ; - -return 0 ; }static int regcache_flat_populate (struct regmap *map)
drivers/base/regmap/regcache-maple.c +2 -4
@@ -307,7 +307,7 @@ static int regcache_maple_init(struct regmap *map)return 0 ; } -static int regcache_maple_exit (struct regmap *map) +static void regcache_maple_exit (struct regmap *map) {struct maple_tree *mt = map->cache;MA_STATE (mas, mt,0 ,UINT_MAX );
@@ -315,7 +315,7 @@ static int regcache_maple_exit(struct regmap *map)/* if we've already been called then just return */ if (!mt) -return 0 ; +return ;mas_lock (&mas);mas_for_each (&mas, entry,UINT_MAX )
@@ -325,8 +325,6 @@ static int regcache_maple_exit(struct regmap *map)kfree (mt); map->cache =NULL ; - -return 0 ; } static int regcache_maple_insert_block(struct regmap *map, int first,
drivers/base/regmap/regcache-rbtree.c +3 -5
@@ -16,7 +16,7 @@static int regcache_rbtree_write (struct regmap *map,unsigned int reg,unsigned int value); -static int regcache_rbtree_exit (struct regmap *map); +static void regcache_rbtree_exit (struct regmap *map);struct regcache_rbtree_node {/* block of adjacent registers */
@@ -196,7 +196,7 @@ static int regcache_rbtree_init(struct regmap *map)return 0 ; } -static int regcache_rbtree_exit (struct regmap *map) +static void regcache_rbtree_exit (struct regmap *map) {struct rb_node *next;struct regcache_rbtree_ctx *rbtree_ctx;
@@ -205,7 +205,7 @@ static int regcache_rbtree_exit(struct regmap *map)/* if we've already been called then just return */ rbtree_ctx = map->cache;if (!rbtree_ctx) -return 0 ; +return ;/* free up the rbtree */ next =rb_first (&rbtree_ctx->root);
@@ -221,8 +221,6 @@ static int regcache_rbtree_exit(struct regmap *map)/* release the resources */ kfree (map->cache); map->cache =NULL ; - -return 0 ; }static int regcache_rbtree_populate (struct regmap *map)
Signature · 1 line
2.50.1
Mark Brown
maintainerQuoted 1 line · Andy Shevchenko
regcache: Make ->exit() callback return void
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-7.3
Thanks!
[1/1] regcache: Make ->exit() callback return void
https://git.kernel.org/broonie/regmap/c/e427e1832bb0
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