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

Configure Feed

Select the types of activity you want to include in your feed.

udp: Make udp[46]_seq_show() static.

Since commit a3d2599b2446 ("ipv{4,6}/udp{,lite}: simplify proc
registration"), udp4_seq_show() and udp6_seq_show() are not
used in net/ipv4/udplite.c and net/ipv6/udplite.c.

Instead, udp_seq_ops and udp6_seq_ops are exposed to UDP-Lite.

Let's make udp4_seq_show() and udp6_seq_show() static.

udp_seq_ops and udp6_seq_ops are moved to udp_impl.h so that
we can make them static when the header is removed.

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20260311052020.1213705-2-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Kuniyuki Iwashima and committed by
Jakub Kicinski
86a41d95 8f921f61

+4 -9
-3
include/net/udp.h
··· 576 576 void *udp_seq_next(struct seq_file *seq, void *v, loff_t *pos); 577 577 void udp_seq_stop(struct seq_file *seq, void *v); 578 578 579 - extern const struct seq_operations udp_seq_ops; 580 - extern const struct seq_operations udp6_seq_ops; 581 - 582 579 int udp4_proc_init(void); 583 580 void udp4_proc_exit(void); 584 581 #endif /* CONFIG_PROC_FS */
+1 -2
net/ipv4/udp.c
··· 3443 3443 sk_drops_read(sp)); 3444 3444 } 3445 3445 3446 - int udp4_seq_show(struct seq_file *seq, void *v) 3446 + static int udp4_seq_show(struct seq_file *seq, void *v) 3447 3447 { 3448 3448 seq_setwidth(seq, 127); 3449 3449 if (v == SEQ_START_TOKEN) ··· 3753 3753 .stop = udp_seq_stop, 3754 3754 .show = udp4_seq_show, 3755 3755 }; 3756 - EXPORT_IPV6_MOD(udp_seq_ops); 3757 3756 3758 3757 static struct udp_seq_afinfo udp4_seq_afinfo = { 3759 3758 .family = AF_INET,
+1 -1
net/ipv4/udp_impl.h
··· 22 22 void udp_destroy_sock(struct sock *sk); 23 23 24 24 #ifdef CONFIG_PROC_FS 25 - int udp4_seq_show(struct seq_file *seq, void *v); 25 + extern const struct seq_operations udp_seq_ops; 26 26 #endif 27 27 #endif /* _UDP4_IMPL_H */
+1 -2
net/ipv6/udp.c
··· 1903 1903 1904 1904 /* ------------------------------------------------------------------------ */ 1905 1905 #ifdef CONFIG_PROC_FS 1906 - int udp6_seq_show(struct seq_file *seq, void *v) 1906 + static int udp6_seq_show(struct seq_file *seq, void *v) 1907 1907 { 1908 1908 if (v == SEQ_START_TOKEN) { 1909 1909 seq_puts(seq, IPV6_SEQ_DGRAM_HEADER); ··· 1924 1924 .stop = udp_seq_stop, 1925 1925 .show = udp6_seq_show, 1926 1926 }; 1927 - EXPORT_SYMBOL(udp6_seq_ops); 1928 1927 1929 1928 static struct udp_seq_afinfo udp6_seq_afinfo = { 1930 1929 .family = AF_INET6,
+1 -1
net/ipv6/udp_impl.h
··· 26 26 void udpv6_destroy_sock(struct sock *sk); 27 27 28 28 #ifdef CONFIG_PROC_FS 29 - int udp6_seq_show(struct seq_file *seq, void *v); 29 + extern const struct seq_operations udp6_seq_ops; 30 30 #endif 31 31 #endif /* _UDP6_IMPL_H */