From: Mark Brown <broonie@kernel.org>
To: Guenter Roeck <linux@roeck-us.net>,
Dan Carpenter <dan.carpenter@linaro.org>,
Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>
Subject: [PATCH] regmap: Remove dynamic allocation warnings for rbtree and maple
Date: Fri, 21 Jul 2023 17:31:36 +0100 [thread overview]
Message-ID: <20230721-regmap-enable-kmalloc-v1-1-f78287e794d3@kernel.org> (raw)
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 <broonie@kernel.org>
---
drivers/base/regmap/regmap.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 6c637b18d6b0..8b37451fa931 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -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;
---
base-commit: b0393e1fe40e962574613a5cdc4a470d6c1de023
change-id: 20230721-regmap-enable-kmalloc-2e2d0d018cef
Best regards,
--
Mark Brown <broonie@kernel.org>
next reply other threads:[~2023-07-21 16:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-21 16:31 Mark Brown [this message]
2023-07-21 16:39 ` Guenter Roeck
2023-07-21 17:41 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230721-regmap-enable-kmalloc-v1-1-f78287e794d3@kernel.org \
--to=broonie@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=m.szyprowski@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®