diff options
author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2025-03-18 06:48:51 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-03-25 14:30:07 +0300 |
commit | 0083e3e37e07961465bfbc44e19035381eaeb574 (patch) | |
tree | 29dc19578a1bcaad3062be16ebc63d5eaccda95c /net/unix/sysctl_net_unix.c | |
parent | 3056172a261c88fc834147f6427b09dfe4d4290b (diff) | |
download | linux-0083e3e37e07961465bfbc44e19035381eaeb574.tar.xz |
af_unix: Clean up #include under net/unix/.
net/unix/*.c include many unnecessary header files (rtnetlink.h,
netdevice.h, etc).
Let's clean them up.
af_unix.c:
+uapi/linux/sockios.h : Only exist under include/uapi
+uapi/linux/termios.h : Only exist under include/uapi
-linux/freezer.h : No longer use freezable_schedule_timeout()
-linux/in.h : No ipv4_is_XXX() etc
-linux/module.h : No longer support CONFIG_UNIX=m
-linux/netdevice.h : No dev used
-linux/rtnetlink.h : Not part of rtnetlink API
-linux/signal.h : signal_pending() is defined in sched/signal.h
-linux/stat.h : No struct stat used
-net/checksum.h : CHECKSUM_UNNECESSARY is defined in skbuff.h
diag.c:
+linux/dcache.h : struct dentry in sk_diag_dump_vfs()
+linux/user_namespace.h : struct user_namespace in sk_diag_dump_uid()
+uapi/linux/unix_diag.h : Only exist under include/uapi/
garbage.c:
+linux/list.h : struct unix_{vertex,edge}, etc
+linux/workqueue.h : DECLARE_WORK(unix_gc_work, ...)
-linux/file.h : No fget() etc
-linux/kernel.h : No cond_resched() etc
-linux/netdevice.h : No dev used
-linux/proc_fs.h : No procfs provided
-linux/string.h : No memcpy(), kmemdup(), etc
sysctl_net_unix.c:
+linux/string.h : kmemdup()
+net/net_namespace.h : struct net, net_eq()
-linux/mm.h : slab.h is enough
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250318034934.86708-5-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
-rw-r--r-- | net/unix/sysctl_net_unix.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/unix/sysctl_net_unix.c b/net/unix/sysctl_net_unix.c index 236b7faa9254..e02ed6e3955c 100644 --- a/net/unix/sysctl_net_unix.c +++ b/net/unix/sysctl_net_unix.c @@ -5,10 +5,11 @@ * Authors: Mike Shaver. */ -#include <linux/mm.h> #include <linux/slab.h> +#include <linux/string.h> #include <linux/sysctl.h> #include <net/af_unix.h> +#include <net/net_namespace.h> #include "af_unix.h" |