Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sctp: Remove unused sctp_assoc_del_peer and sctp_chunk_iif

sctp_assoc_del_peer() last use was removed in 2015 by
commit 73e6742027f5 ("sctp: Do not try to search for the transport twice")
which now uses rm_peer instead of del_peer.

sctp_chunk_iif() last use was removed in 2016 by
commit 1f45f78f8e51 ("sctp: allow GSO frags to access the chunk too")

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Acked-by: Xin Long <lucien.xin@gmail.com>
Link: https://patch.msgid.link/20250501233815.99832-1-linux@treblig.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Dr. David Alan Gilbert and committed by
Jakub Kicinski
ac8f09b9 1f586017

-29
-1
include/net/sctp/sm.h
··· 161 161 enum sctp_event_type event_type, 162 162 enum sctp_state state, 163 163 union sctp_subtype event_subtype); 164 - int sctp_chunk_iif(const struct sctp_chunk *); 165 164 struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *, 166 165 struct sctp_chunk *, 167 166 gfp_t gfp);
-2
include/net/sctp/structs.h
··· 2152 2152 const union sctp_addr *address, 2153 2153 const gfp_t gfp, 2154 2154 const int peer_state); 2155 - void sctp_assoc_del_peer(struct sctp_association *asoc, 2156 - const union sctp_addr *addr); 2157 2155 void sctp_assoc_rm_peer(struct sctp_association *asoc, 2158 2156 struct sctp_transport *peer); 2159 2157 void sctp_assoc_control_transport(struct sctp_association *asoc,
-18
net/sctp/associola.c
··· 736 736 return peer; 737 737 } 738 738 739 - /* Delete a transport address from an association. */ 740 - void sctp_assoc_del_peer(struct sctp_association *asoc, 741 - const union sctp_addr *addr) 742 - { 743 - struct list_head *pos; 744 - struct list_head *temp; 745 - struct sctp_transport *transport; 746 - 747 - list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { 748 - transport = list_entry(pos, struct sctp_transport, transports); 749 - if (sctp_cmp_addr_exact(addr, &transport->ipaddr)) { 750 - /* Do book keeping for removing the peer and free it. */ 751 - sctp_assoc_rm_peer(asoc, transport); 752 - break; 753 - } 754 - } 755 - } 756 - 757 739 /* Lookup a transport by address. */ 758 740 struct sctp_transport *sctp_assoc_lookup_paddr( 759 741 const struct sctp_association *asoc,
-8
net/sctp/sm_make_chunk.c
··· 115 115 skb->destructor = sctp_control_release_owner; 116 116 } 117 117 118 - /* What was the inbound interface for this chunk? */ 119 - int sctp_chunk_iif(const struct sctp_chunk *chunk) 120 - { 121 - struct sk_buff *skb = chunk->skb; 122 - 123 - return SCTP_INPUT_CB(skb)->af->skb_iif(skb); 124 - } 125 - 126 118 /* RFC 2960 3.3.2 Initiation (INIT) (1) 127 119 * 128 120 * Note 2: The ECN capable field is reserved for future use of