mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
tun: remove unused parameters
[ Upstream commit 06e55addd3 ]
tun_napi_disable() and tun_napi_del() do not need
a pointer to the tun_struct
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
095a5309c6
commit
7d96410f39
@@ -323,13 +323,13 @@ static void tun_napi_init(struct tun_struct *tun, struct tun_file *tfile,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tun_napi_disable(struct tun_struct *tun, struct tun_file *tfile)
|
static void tun_napi_disable(struct tun_file *tfile)
|
||||||
{
|
{
|
||||||
if (tfile->napi_enabled)
|
if (tfile->napi_enabled)
|
||||||
napi_disable(&tfile->napi);
|
napi_disable(&tfile->napi);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tun_napi_del(struct tun_struct *tun, struct tun_file *tfile)
|
static void tun_napi_del(struct tun_file *tfile)
|
||||||
{
|
{
|
||||||
if (tfile->napi_enabled)
|
if (tfile->napi_enabled)
|
||||||
netif_napi_del(&tfile->napi);
|
netif_napi_del(&tfile->napi);
|
||||||
@@ -688,8 +688,8 @@ static void __tun_detach(struct tun_file *tfile, bool clean)
|
|||||||
tun = rtnl_dereference(tfile->tun);
|
tun = rtnl_dereference(tfile->tun);
|
||||||
|
|
||||||
if (tun && clean) {
|
if (tun && clean) {
|
||||||
tun_napi_disable(tun, tfile);
|
tun_napi_disable(tfile);
|
||||||
tun_napi_del(tun, tfile);
|
tun_napi_del(tfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tun && !tfile->detached) {
|
if (tun && !tfile->detached) {
|
||||||
@@ -756,7 +756,7 @@ static void tun_detach_all(struct net_device *dev)
|
|||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
tfile = rtnl_dereference(tun->tfiles[i]);
|
tfile = rtnl_dereference(tun->tfiles[i]);
|
||||||
BUG_ON(!tfile);
|
BUG_ON(!tfile);
|
||||||
tun_napi_disable(tun, tfile);
|
tun_napi_disable(tfile);
|
||||||
tfile->socket.sk->sk_shutdown = RCV_SHUTDOWN;
|
tfile->socket.sk->sk_shutdown = RCV_SHUTDOWN;
|
||||||
tfile->socket.sk->sk_data_ready(tfile->socket.sk);
|
tfile->socket.sk->sk_data_ready(tfile->socket.sk);
|
||||||
RCU_INIT_POINTER(tfile->tun, NULL);
|
RCU_INIT_POINTER(tfile->tun, NULL);
|
||||||
@@ -772,7 +772,7 @@ static void tun_detach_all(struct net_device *dev)
|
|||||||
synchronize_net();
|
synchronize_net();
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
tfile = rtnl_dereference(tun->tfiles[i]);
|
tfile = rtnl_dereference(tun->tfiles[i]);
|
||||||
tun_napi_del(tun, tfile);
|
tun_napi_del(tfile);
|
||||||
/* Drop read queue */
|
/* Drop read queue */
|
||||||
tun_queue_purge(tfile);
|
tun_queue_purge(tfile);
|
||||||
xdp_rxq_info_unreg(&tfile->xdp_rxq);
|
xdp_rxq_info_unreg(&tfile->xdp_rxq);
|
||||||
|
|||||||
Reference in New Issue
Block a user