* [PATCH net-next v2]: 3c515 : replace cleanup_module with __exit
@ 2025-10-18 5:25 Shi Hao
2025-10-20 12:56 ` Simon Horman
2025-10-22 1:50 ` [PATCH net-next v2]: 3c515 : " patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Shi Hao @ 2025-10-18 5:25 UTC (permalink / raw)
To: horms; +Cc: andrew+netdev, davem, edumazet, i.shihao.999, kuba, netdev
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.
Signed-off-by: Shi Hao <i.shihao.999@gmail.com>
---
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(-)
diff --git a/drivers/net/ethernet/3com/3c515.c b/drivers/net/ethernet/3com/3c515.c
index ecdea58e6a21..2227c83a4862 100644
--- a/drivers/net/ethernet/3com/3c515.c
+++ b/drivers/net/ethernet/3com/3c515.c
@@ -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
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net-next v2]: 3c515 : replace cleanup_module with __exit
2025-10-18 5:25 [PATCH net-next v2]: 3c515 : replace cleanup_module with __exit Shi Hao
@ 2025-10-20 12:56 ` Simon Horman
2025-10-21 6:07 ` [PATCH net-next v2]: 3c515: " ShiHao
2025-10-22 1:50 ` [PATCH net-next v2]: 3c515 : " patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: Simon Horman @ 2025-10-20 12:56 UTC (permalink / raw)
To: Shi Hao; +Cc: andrew+netdev, davem, edumazet, kuba, netdev
On Sat, Oct 18, 2025 at 10:55:41AM +0530, Shi Hao wrote:
> 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.
>
> Signed-off-by: Shi Hao <i.shihao.999@gmail.com>
>
> ---
>
> 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.
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v2]: 3c515: replace cleanup_module with __exit
2025-10-20 12:56 ` Simon Horman
@ 2025-10-21 6:07 ` ShiHao
0 siblings, 0 replies; 4+ messages in thread
From: ShiHao @ 2025-10-21 6:07 UTC (permalink / raw)
To: Simon Horman
Cc: --cc=andrew+netdev, davem, edumazet, i.shihao.999, kuba, netdev
> 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.
>
> Reviewed-by: Simon Horman <horms@kernel.org>
Thanks, Simon
I’ll make sure correct whitespace formatting next time.
Appreciate the review. Thanks for your time.
Best regards,
Shi Hao
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v2]: 3c515 : replace cleanup_module with __exit
2025-10-18 5:25 [PATCH net-next v2]: 3c515 : replace cleanup_module with __exit Shi Hao
2025-10-20 12:56 ` Simon Horman
@ 2025-10-22 1:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-10-22 1:50 UTC (permalink / raw)
To: ShiHao; +Cc: horms, andrew+netdev, davem, edumazet, kuba, netdev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Sat, 18 Oct 2025 10:55:41 +0530 you wrote:
> 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.
>
> [...]
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-10-22 1:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-18 5:25 [PATCH net-next v2]: 3c515 : replace cleanup_module with __exit Shi Hao
2025-10-20 12:56 ` Simon Horman
2025-10-21 6:07 ` [PATCH net-next v2]: 3c515: " ShiHao
2025-10-22 1:50 ` [PATCH net-next v2]: 3c515 : " patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).