mbox series

[v1,net-next,0/4] af_unix: Clean up headers.

Message ID 20250318034934.86708-1-kuniyu@amazon.com (mailing list archive)
Headers show
Series af_unix: Clean up headers. | expand

Message

Kuniyuki Iwashima March 18, 2025, 3:48 a.m. UTC
AF_UNIX files include many unnecessary headers (netdevice.h and
rtnetlink.h, etc), and this series cleans them up.

Note that there are still some headers included indirectly and
modifying them triggers rebuild, which seems mostly inevitable. [0]

  $ python3 include_graph.py net/unix/garbage.c linux/rtnetlink.h linux/netdevice.h
  ...
  include/net/af_unix.h
  | include/linux/net.h
  | | include/linux/once.h
  | | include/linux/sockptr.h
  | | include/uapi/linux/net.h
  | include/net/sock.h
  | | include/linux/netdevice.h   <---
  ...
  | | include/net/dst.h
  | | | include/linux/rtnetlink.h <---

[0]: https://gist.github.com/q2ven/9c5897f11a493145829029c0bfb364d0


Kuniyuki Iwashima (4):
  af_unix: Sort headers.
  af_unix: Move internal definitions to net/unix/.
  af_unix: Explicitly include headers for non-pointer struct fields.
  af_unix: Clean up #include under net/unix/.

 include/net/af_unix.h      | 84 ++++----------------------------------
 net/unix/af_unix.c         | 55 +++++++++++--------------
 net/unix/af_unix.h         | 75 ++++++++++++++++++++++++++++++++++
 net/unix/diag.c            | 18 ++++----
 net/unix/garbage.c         | 33 +++++++++------
 net/unix/sysctl_net_unix.c |  6 ++-
 net/unix/unix_bpf.c        |  5 ++-
 7 files changed, 143 insertions(+), 133 deletions(-)
 create mode 100644 net/unix/af_unix.h