From: Leon Romanovsky <leon@kernel.org>
To: "Ziyang Xuan (William)" <william.xuanziyang@huawei.com>
Cc: willemdebruijn.kernel@gmail.com, jasowang@redhat.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] tun: add __exit annotations to module exit func tun_cleanup()
Date: Mon, 14 Aug 2023 15:05:15 +0300 [thread overview]
Message-ID: <20230814120515.GH3921@unreal> (raw)
In-Reply-To: <0b8a2c5f-0d53-f5e5-f148-b333c0c89a14@huawei.com>
On Mon, Aug 14, 2023 at 07:27:59PM +0800, Ziyang Xuan (William) wrote:
> > On Mon, Aug 14, 2023 at 04:30:00PM +0800, Ziyang Xuan wrote:
> >> Add missing __exit annotations to module exit func tun_cleanup().
> >>
> >> Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
> >> ---
> >> drivers/net/tun.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> >> index 973b2fc74de3..291c118579a9 100644
> >> --- a/drivers/net/tun.c
> >> +++ b/drivers/net/tun.c
> >> @@ -3740,7 +3740,7 @@ static int __init tun_init(void)
> >> return ret;
> >> }
> >>
> >> -static void tun_cleanup(void)
> >> +static void __exit tun_cleanup(void)
> >
> > Why __exit and not __net_exit?
>
> tun_cleanup() is a module exit function. it corresponds to tun_init().
> tun_init() uses __init, so tun_cleanup() uses __exit.
__net_init is equal to __init.
>
> Thank you!
> William Xuan
> >
> > Thanks
> >
> >> {
> >> misc_deregister(&tun_miscdev);
> >> rtnl_link_unregister(&tun_link_ops);
> >> --
> >> 2.25.1
> >>
> >>
> > .
> >
next prev parent reply other threads:[~2023-08-14 12:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-14 8:30 [PATCH net-next] tun: add __exit annotations to module exit func tun_cleanup() Ziyang Xuan
2023-08-14 10:17 ` Leon Romanovsky
2023-08-14 11:27 ` Ziyang Xuan (William)
2023-08-14 12:05 ` Leon Romanovsky [this message]
2023-08-14 12:23 ` Ziyang Xuan (William)
2023-08-14 12:32 ` Leon Romanovsky
2023-08-18 2:20 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230814120515.GH3921@unreal \
--to=leon@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jasowang@redhat.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemdebruijn.kernel@gmail.com \
--cc=william.xuanziyang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox