Thread (19 messages) 19 messages, 6 authors, 2026-03-31

Re: [PATCH v4 2/3] driver core: make software nodes available earlier

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2026-03-31 07:01:27
Also in: driver-core, linux-acpi, linux-omap, lkml

On March 30, 2026 11:25:33 PM PDT, Andy Shevchenko [off-list ref] wrote:
On Mon, Mar 30, 2026 at 02:46:45PM -0700, Dmitry Torokhov wrote:
quoted
On Mon, Mar 30, 2026 at 11:24:45PM +0300, Andy Shevchenko wrote:
quoted
On Mon, Mar 30, 2026 at 02:40:47PM +0200, Bartosz Golaszewski wrote:
...
quoted
quoted
quoted
-static void __exit software_node_exit(void)
-{
-	ida_destroy(&swnode_root_ids);
-	kset_unregister(swnode_kset);
 }
-__exitcall(software_node_exit);
Why? What's wrong with the __exitcall?
It's dead code. Always was, always will be.

Maybe split in a separate patch, but I sometimes feel the idea of "one
change" is taken to extreme and adds to both developer's and maintainers
burden by needing to keep track of extra patches.
Why does __exitcall() exist then? It's also used in other places.
I think it's generally good to have a possibility to clean up
after run.
The code section will be discarded when the kernel finishes booting so it only increases image size on disk. 
A bit of archaeology:

The first time it appeared was in the bcc2152647b8 ("Import 2.4.0-test3pre3").
Then somehow spread a bit (but not much).
And it shows how useful it is. Maybe it had some purpose a long time ago, but at present time this code will never be executed since it cannot be built as a module.

Thanks. 

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help