netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net/x25: Remove unused x25_terminate_link()
@ 2025-07-12 20:57 linux
  2025-07-14  6:11 ` Martin Schiller
  2025-07-15  0:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: linux @ 2025-07-12 20:57 UTC (permalink / raw)
  To: ms, davem, edumazet, kuba, pabeni, horms
  Cc: linux-x25, netdev, linux-kernel, Dr. David Alan Gilbert

From: "Dr. David Alan Gilbert" <linux@treblig.org>

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>
---
 include/net/x25.h |  1 -
 net/x25/x25_dev.c | 22 ----------------------
 2 files changed, 23 deletions(-)

diff --git a/include/net/x25.h b/include/net/x25.h
index 5e833cfc864e..414f3fd99345 100644
--- a/include/net/x25.h
+++ b/include/net/x25.h
@@ -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 *,
diff --git a/net/x25/x25_dev.c b/net/x25/x25_dev.c
index 748d8630ab58..fb8ac1aa5826 100644
--- a/net/x25/x25_dev.c
+++ b/net/x25/x25_dev.c
@@ -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;
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net/x25: Remove unused x25_terminate_link()
  2025-07-12 20:57 [PATCH net-next] net/x25: Remove unused x25_terminate_link() linux
@ 2025-07-14  6:11 ` Martin Schiller
  2025-07-15  0:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Martin Schiller @ 2025-07-14  6:11 UTC (permalink / raw)
  To: linux; +Cc: davem, edumazet, kuba, pabeni, horms, linux-x25, netdev,
	linux-kernel

On 2025-07-12 22:57, linux@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
> 
> 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>
> ---
>  include/net/x25.h |  1 -
>  net/x25/x25_dev.c | 22 ----------------------
>  2 files changed, 23 deletions(-)
> 
> diff --git a/include/net/x25.h b/include/net/x25.h
> index 5e833cfc864e..414f3fd99345 100644
> --- a/include/net/x25.h
> +++ b/include/net/x25.h
> @@ -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 *,
> diff --git a/net/x25/x25_dev.c b/net/x25/x25_dev.c
> index 748d8630ab58..fb8ac1aa5826 100644
> --- a/net/x25/x25_dev.c
> +++ b/net/x25/x25_dev.c
> @@ -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;

Acked-by: Martin Schiller <ms@dev.tdt.de>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net/x25: Remove unused x25_terminate_link()
  2025-07-12 20:57 [PATCH net-next] net/x25: Remove unused x25_terminate_link() linux
  2025-07-14  6:11 ` Martin Schiller
@ 2025-07-15  0:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-07-15  0:30 UTC (permalink / raw)
  To: Dr. David Alan Gilbert
  Cc: ms, davem, edumazet, kuba, pabeni, horms, linux-x25, netdev,
	linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Sat, 12 Jul 2025 21:57:59 +0100 you wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
> 
> 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.
> 
> [...]

Here is the summary with links:
  - [net-next] net/x25: Remove unused x25_terminate_link()
    https://git.kernel.org/netdev/net-next/c/08a305b2a5b8

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] 3+ messages in thread

end of thread, other threads:[~2025-07-15  0:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-12 20:57 [PATCH net-next] net/x25: Remove unused x25_terminate_link() linux
2025-07-14  6:11 ` Martin Schiller
2025-07-15  0:30 ` 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).