]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net/x25: Remove unused x25_terminate_link()
authorDr. David Alan Gilbert <linux@treblig.org>
Sat, 12 Jul 2025 20:57:59 +0000 (21:57 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 15 Jul 2025 00:19:13 +0000 (17:19 -0700)
x25_terminate_link() has been unused since the last use was removed
in 2020 by:
commit 7eed751b3b2a ("net/x25: handle additional netdev events")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Acked-by: Martin Schiller <ms@dev.tdt.de>
Link: https://patch.msgid.link/20250712205759.278777-1-linux@treblig.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/x25.h
net/x25/x25_dev.c

index 5e833cfc864e29fd9196944116fb8544c582636b..414f3fd99345455dd30f0cc827736fbce61fd99a 100644 (file)
@@ -203,7 +203,6 @@ void x25_send_frame(struct sk_buff *, struct x25_neigh *);
 int x25_lapb_receive_frame(struct sk_buff *, struct net_device *,
                           struct packet_type *, struct net_device *);
 void x25_establish_link(struct x25_neigh *);
-void x25_terminate_link(struct x25_neigh *);
 
 /* x25_facilities.c */
 int x25_parse_facilities(struct sk_buff *, struct x25_facilities *,
index 748d8630ab58b9ed7937ccbf5e59483aecae1fa2..fb8ac1aa582695f906540a0bfb2c15af5971d7b1 100644 (file)
@@ -170,28 +170,6 @@ void x25_establish_link(struct x25_neigh *nb)
        dev_queue_xmit(skb);
 }
 
-void x25_terminate_link(struct x25_neigh *nb)
-{
-       struct sk_buff *skb;
-       unsigned char *ptr;
-
-       if (nb->dev->type != ARPHRD_X25)
-               return;
-
-       skb = alloc_skb(1, GFP_ATOMIC);
-       if (!skb) {
-               pr_err("x25_dev: out of memory\n");
-               return;
-       }
-
-       ptr  = skb_put(skb, 1);
-       *ptr = X25_IFACE_DISCONNECT;
-
-       skb->protocol = htons(ETH_P_X25);
-       skb->dev      = nb->dev;
-       dev_queue_xmit(skb);
-}
-
 void x25_send_frame(struct sk_buff *skb, struct x25_neigh *nb)
 {
        unsigned char *dptr;