]> Git Repo - linux.git/commitdiff
regmap: Remove dynamic allocation warnings for rbtree and maple
authorMark Brown <[email protected]>
Fri, 21 Jul 2023 16:31:36 +0000 (17:31 +0100)
committerMark Brown <[email protected]>
Fri, 21 Jul 2023 16:36:09 +0000 (17:36 +0100)
Thanks to Dan and Guenter's very prompt updates of the rbtree and maple
caches to support GPF_ATOMIC allocations and since the update shook out
a bunch of users at least some of whom have been suitably careful about
ensuring that the cache is prepoulated so there are no dynamic
allocations after init let's revert the warnings.

Signed-off-by: Mark Brown <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
drivers/base/regmap/regmap.c

index 6c637b18d6b0bbc26ef35ef8400fe330c1eca9a9..8b37451fa9315fd3a8d42805745c6234382de035 100644 (file)
@@ -723,15 +723,6 @@ struct regmap *__regmap_init(struct device *dev,
        } else {
                if ((bus && bus->fast_io) ||
                    config->fast_io) {
-                       /*
-                        * fast_io is incompatible with REGCACHE_RBTREE and REGCACHE_MAPLE
-                        * since both need to dynamically allocate memory.
-                        */
-                       if (config->cache_type == REGCACHE_RBTREE ||
-                           config->cache_type == REGCACHE_MAPLE) {
-                               ret = -EINVAL;
-                               goto err_name;
-                       }
                        if (config->use_raw_spinlock) {
                                raw_spin_lock_init(&map->raw_spinlock);
                                map->lock = regmap_lock_raw_spinlock;
This page took 0.062967 seconds and 4 git commands to generate.