Re: [PATCH v1 2/4] regmap: Drop never used devm_regmap_*_free() APIs
From: Mark Brown
Date: Fri Nov 13 2026 - 16:06:45 EST
On Thu, Nov 12, 2026 at 08:56:40AM +0200, Andy Shevchenko wrote:
> On Wed, Nov 11, 2026 at 06:49:02PM +0000, Mark Brown wrote:
> > I tend to think that if we have allocation functions we should have
> > matching release functions, this avoids cross tree annoyances and bugs
> > due to people using inappropriate release functions which actually
> > exist rather than adding the ones they should use.
> In general yes, but for devm_*() it makes not much sense as proven by dozens
> of dropped "release/free" type of devm_*() calls in the past. Also as commit
> message says for more than 10 years nobody used it even once. What does make
> you think there eventually be at least a single user?
Some of those release/free of devm issues are people intentionally doing
a free and using the wrong function to do so, the main use case is
enumerating something and deciding that some of the functionality is not
usable so freeing the state for that functionality so you're not wasting
memory carrying it around unused.
Attachment:
signature.asc
Description: PGP signature