Johannes Berg wrote:That I would have prefered to see subsys_exit in front of subsys_initcall instead of module_exit because 1) it made me wonder if it still works in the module case 2) If you see the comment in init.h (/* Don't use these in modules, but some people do... */), you should not use it in module. The comment is, at least misleading, because for code that can be used as module or directly embedded in some cases you are indeed forced to use it (did a grep and found a lot) 3) Non symetrical code frequently points to errors or bad design. YMMV :-) 4) If someone someday find something to do when shutting down (hotrestart, fault tolerance, or something equivalent), we would have a place to hook. C++ has destructors called after main and before __exit... NB : This has nothing to do with the proposed patch that is definitively correct given current init.h. Personally, I would certainly add: #define subsys_exit(fn) in init.h But would rate it myself as a cosmetic change as it *only* makes the code more obvious to read :-) -- eric -
| Ingo Molnar | [patch 12/13] syslets: x86: optimized copy_uatom() |
| Greg Kroah-Hartman | [PATCH 017/196] aoechr: Convert from class_device to device |
| Yinghai Lu | Re: 2.6.26, PAT and AMD family 6 |
| Jan Engelhardt | intel iommu (Re: -mm merge plans for 2.6.23) |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Natalie Protasevich | [BUG] New Kernel Bugs |
