: 3c515 : replace cleanup_module with __exit
Subsystems (2)
PATCH v2 1/1 : 3c515 : replace cleanup_module with __exit
update old legacy cleanup_module from the file with __exit module as per kernel code practices and restore the #ifdef MODULE condition to allow successful compilation as a built -in driver.
The file had an old cleanup_module still in use which could be updated with __exit module function although its init_module is indeed newer however the cleanup_module was still using the older version of exit.
To set proper exit module function replace cleanup_module with __exit corkscrew_exit_module to align it to the kernel code consistency.
---
changes v2:
- Restore ifdef module condition to compile as built in module
- Adjust subject prefix from "net:ethernet" to "3c515"
--- drivers/net/ethernet/3com/3c515.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/3com/3c515.c +2 -2
@@ -1547,9 +1547,8 @@ static const struct ethtool_ops netdev_ethtool_ops = { .set_msglevel = netdev_set_msglevel, }; -#ifdef MODULE -void cleanup_module (void ) +static void __exit corkscrew_exit_module(void) {while (!list_empty (&root_corkscrew_dev)) {struct net_device *dev;
@@ -1563,4 +1562,5 @@ void cleanup_module(void) free_netdev(dev); } } +module_exit (corkscrew_exit_module);#endif /* MODULE */
--
2.51.0
Quoted 14 lines · Shi Hao
update old legacy
cleanup_modulefrom the file with__exitmodule as per kernel code practices and restore the #ifdef MODULE condition to allow successful compilation as a built -in driver.The file had an old
cleanup_modulestill in use which could be updated with__exitmodule function although itsinit_moduleis indeed newer however thecleanup_modulewas still using the older version of exit.To set proper exit module function replace
cleanup_modulewith__exitcorkscrew_exit_moduleto align it to the kernel code consistency.
Quoted 7 lines
Signed-off-by Shi Hao <[email protected]>---
changes v2:
- Restore ifdef module condition to compile as built in module
- Adjust subject prefix from "net:ethernet" to "3c515"
Thanks for the update.
The code changes in this version look good to me.
One minor nit: the whitespace in the subject look slightly off. There is probably no need to repost because of this. But I would have gone for:
Subject: [PATCH net-next v2] 3c515: replace cleanup_module with __exit
But overall this looks good to me.
Re: [PATCH net-next v2]: 3c515: replace cleanup_module with __exit
Quoted 7 lines
Thanks for the update.
The code changes in this version look good to me.One minor nit: the whitespace in the subject look slightly off. There is probably no need to repost because of this. But I would have gone for:
Quoted 5 lines
Subject: [PATCH net-next v2] 3c515: replace
cleanup_modulewith__exitBut overall this looks good to me.
Reviewed-by Simon Horman <[email protected]>
Thanks, Simon
I’ll make sure correct whitespace formatting next time. Appreciate the review. Thanks for your time.
Best regards,
Shi Hao
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 11 lines · On Sat, 18 Oct 2025 10:55:41 +0530 you wrote:
update old legacy
cleanup_modulefrom the file with__exitmodule as per kernel code practices and restore the #ifdef MODULE condition to allow successful compilation as a built -in driver.The file had an old
cleanup_modulestill in use which could be updated with__exitmodule function although itsinit_moduleis indeed newer however thecleanup_modulewas still using the older version of exit.[...]
Here is the summary with links:
- [net-next,v2] : 3c515 : replace cleanup_module with __exit
https://git.kernel.org/netdev/net-next/c/1471a274b76d
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html