Re: [PATCH] thermal: change thermal_class to a const struct

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-pm,dev.linux.lists.driver-core,org.kernel.vger.linux-kernel
Message-ID <2026082446-lagging-ominous-0a35@gregkh>
On Mon, Aug 24, 2026 at 06:56:05PM +0200, Greg Kroah-Hartman wrote:
> On Mon, Aug 24, 2026 at 06:09:33PM +0200, Rafael J. Wysocki (Intel) wrote:
> > On Tue, Aug 11, 2026 at 8:17 AM Jori Koolstra <[email protected]> wrote:
> > >
> > > The class_create() call has been deprecated in favor of class_register()
> > > as the driver core now allows for a struct class to be in read-only
> > > memory. Change thermal_class to be a const struct class and drop the
> > > class_create() call.
> > 
> > This has been deliberately changed the other way around not too long
> > ago, in commit
> > 
> > 34f54003643e thermal/core: Allocate the thermal class dynamically
> > 
> > and it was then argued that it would be better to allocate the class
> > dynamically.
> > 
> > You seem to have a differing opinion.
> > 
> > Is there any plan to remove class_create() from the kernel?  If there
> > isn't, I'd rather stop this back-and-forth dance and leave the code
> > as-is.
> 
> Yes, class_create() is going away.  I didn't notice commit 34f54003643e,
> but that's the wrong thing to do here.  We should just revert that
> instead.

And we are down to only a very few callers of that function.  I'll sweep
the tree again after -rc1 is out, apply any pending patches, and drop
the function entirely then.

thanks,

greg k-h
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.