* [PATCH][net-next] net: remove empty inet_exit_net
@ 2019-08-19 12:05 Li RongQing
2019-08-20 1:23 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Li RongQing @ 2019-08-19 12:05 UTC (permalink / raw)
To: netdev
Pointer members of an object with static storage duration, if not
explicitly initialized, will be initialized to a NULL pointer. The
net namespace API checks if this pointer is not NULL before using it,
it are safe to remove the function.
Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
net/ipv4/af_inet.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index ed2301ef872e..70f92aaca411 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1845,13 +1845,8 @@ static __net_init int inet_init_net(struct net *net)
return 0;
}
-static __net_exit void inet_exit_net(struct net *net)
-{
-}
-
static __net_initdata struct pernet_operations af_inet_ops = {
.init = inet_init_net,
- .exit = inet_exit_net,
};
static int __init init_inet_pernet_ops(void)
--
2.16.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][net-next] net: remove empty inet_exit_net
2019-08-19 12:05 [PATCH][net-next] net: remove empty inet_exit_net Li RongQing
@ 2019-08-20 1:23 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-08-20 1:23 UTC (permalink / raw)
To: lirongqing; +Cc: netdev
From: Li RongQing <lirongqing@baidu.com>
Date: Mon, 19 Aug 2019 20:05:15 +0800
> Pointer members of an object with static storage duration, if not
> explicitly initialized, will be initialized to a NULL pointer. The
> net namespace API checks if this pointer is not NULL before using it,
> it are safe to remove the function.
>
> Signed-off-by: Li RongQing <lirongqing@baidu.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-20 1:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-19 12:05 [PATCH][net-next] net: remove empty inet_exit_net Li RongQing
2019-08-20 1:23 ` David Miller
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).