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

add missing includes and forward declarations to networking includes under linux/

Similarly to a recent include/net/ cleanup, this patch adds
missing includes to networking headers under include/linux.
All these problems are currently masked by the existing users
including the missing dependency before the broken header.

Link: https://lore.kernel.org/all/20220723045755.2676857-1-kuba@kernel.org/ v1
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20220726215652.158167-1-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Jakub Kicinski and committed by
Paolo Abeni
5f10376b 4158e389

+57 -6
+2
include/linux/atm_tcp.h
··· 9 9 10 10 #include <uapi/linux/atm_tcp.h> 11 11 12 + struct atm_vcc; 13 + struct module; 12 14 13 15 struct atm_tcp_ops { 14 16 int (*attach)(struct atm_vcc *vcc,int itf);
+5
include/linux/dsa/tag_qca.h
··· 3 3 #ifndef __TAG_QCA_H 4 4 #define __TAG_QCA_H 5 5 6 + #include <linux/types.h> 7 + 8 + struct dsa_switch; 9 + struct sk_buff; 10 + 6 11 #define QCA_HDR_LEN 2 7 12 #define QCA_HDR_VERSION 0x2 8 13
+4
include/linux/hippidevice.h
··· 23 23 24 24 #ifdef __KERNEL__ 25 25 26 + struct neigh_parms; 27 + struct net_device; 28 + struct sk_buff; 29 + 26 30 struct hippi_cb { 27 31 __u32 ifield; 28 32 };
+1
include/linux/if_eql.h
··· 21 21 22 22 #include <linux/timer.h> 23 23 #include <linux/spinlock.h> 24 + #include <net/net_trackers.h> 24 25 #include <uapi/linux/if_eql.h> 25 26 26 27 typedef struct slave {
+4
include/linux/if_hsr.h
··· 2 2 #ifndef _LINUX_IF_HSR_H_ 3 3 #define _LINUX_IF_HSR_H_ 4 4 5 + #include <linux/types.h> 6 + 7 + struct net_device; 8 + 5 9 /* used to differentiate various protocols */ 6 10 enum hsr_version { 7 11 HSR_V0 = 0,
+2
include/linux/if_rmnet.h
··· 5 5 #ifndef _LINUX_IF_RMNET_H_ 6 6 #define _LINUX_IF_RMNET_H_ 7 7 8 + #include <linux/types.h> 9 + 8 10 struct rmnet_map_header { 9 11 u8 flags; /* MAP_CMD_FLAG, MAP_PAD_LEN_MASK */ 10 12 u8 mux_id;
+6 -5
include/linux/if_tap.h
··· 2 2 #ifndef _LINUX_IF_TAP_H_ 3 3 #define _LINUX_IF_TAP_H_ 4 4 5 + #include <net/sock.h> 6 + #include <linux/skb_array.h> 7 + 8 + struct file; 9 + struct socket; 10 + 5 11 #if IS_ENABLED(CONFIG_TAP) 6 12 struct socket *tap_get_socket(struct file *); 7 13 struct ptr_ring *tap_get_ptr_ring(struct file *file); 8 14 #else 9 15 #include <linux/err.h> 10 16 #include <linux/errno.h> 11 - struct file; 12 - struct socket; 13 17 static inline struct socket *tap_get_socket(struct file *f) 14 18 { 15 19 return ERR_PTR(-EINVAL); ··· 23 19 return ERR_PTR(-EINVAL); 24 20 } 25 21 #endif /* CONFIG_TAP */ 26 - 27 - #include <net/sock.h> 28 - #include <linux/skb_array.h> 29 22 30 23 /* 31 24 * Maximum times a tap device can be opened. This can be used to
+4
include/linux/mdio/mdio-xgene.h
··· 8 8 #ifndef __MDIO_XGENE_H__ 9 9 #define __MDIO_XGENE_H__ 10 10 11 + #include <linux/bits.h> 12 + #include <linux/spinlock.h> 13 + #include <linux/types.h> 14 + 11 15 #define BLOCK_XG_MDIO_CSR_OFFSET 0x5000 12 16 #define BLOCK_DIAG_CSR_OFFSET 0xd000 13 17 #define XGENET_CONFIG_REG_ADDR 0x20
+2
include/linux/nl802154.h
··· 8 8 #ifndef NL802154_H 9 9 #define NL802154_H 10 10 11 + #include <net/netlink.h> 12 + 11 13 #define IEEE802154_NL_NAME "802.15.4 MAC" 12 14 #define IEEE802154_MCAST_COORD_NAME "coordinator" 13 15 #define IEEE802154_MCAST_BEACON_NAME "beacon"
+3
include/linux/phy_fixed.h
··· 2 2 #ifndef __PHY_FIXED_H 3 3 #define __PHY_FIXED_H 4 4 5 + #include <linux/types.h> 6 + 5 7 struct fixed_phy_status { 6 8 int link; 7 9 int speed; ··· 14 12 15 13 struct device_node; 16 14 struct gpio_desc; 15 + struct net_device; 17 16 18 17 #if IS_ENABLED(CONFIG_FIXED_PHY) 19 18 extern int fixed_phy_change_carrier(struct net_device *dev, bool new_carrier);
+1 -1
include/linux/ppp-comp.h
··· 9 9 10 10 #include <uapi/linux/ppp-comp.h> 11 11 12 - 12 + struct compstat; 13 13 struct module; 14 14 15 15 /*
+2
include/linux/ppp_channel.h
··· 20 20 #include <linux/poll.h> 21 21 #include <net/net_namespace.h> 22 22 23 + struct net_device_path; 24 + struct net_device_path_ctx; 23 25 struct ppp_channel; 24 26 25 27 struct ppp_channel_ops {
+2
include/linux/ptp_kvm.h
··· 8 8 #ifndef _PTP_KVM_H_ 9 9 #define _PTP_KVM_H_ 10 10 11 + #include <linux/types.h> 12 + 11 13 struct timespec64; 12 14 struct clocksource; 13 15
+4
include/linux/ptp_pch.h
··· 10 10 #ifndef _PTP_PCH_H_ 11 11 #define _PTP_PCH_H_ 12 12 13 + #include <linux/types.h> 14 + 15 + struct pci_dev; 16 + 13 17 void pch_ch_control_write(struct pci_dev *pdev, u32 val); 14 18 u32 pch_ch_event_read(struct pci_dev *pdev); 15 19 void pch_ch_event_write(struct pci_dev *pdev, u32 val);
+1
include/linux/seq_file_net.h
··· 3 3 #define __SEQ_FILE_NET_H__ 4 4 5 5 #include <linux/seq_file.h> 6 + #include <net/net_trackers.h> 6 7 7 8 struct net; 8 9 extern struct net init_net;
+2
include/linux/sungem_phy.h
··· 2 2 #ifndef __SUNGEM_PHY_H__ 3 3 #define __SUNGEM_PHY_H__ 4 4 5 + #include <linux/types.h> 6 + 5 7 struct mii_phy; 6 8 7 9 /* Operations supported by any kind of PHY */
+6
include/linux/usb/usbnet.h
··· 23 23 #ifndef __LINUX_USB_USBNET_H 24 24 #define __LINUX_USB_USBNET_H 25 25 26 + #include <linux/mii.h> 27 + #include <linux/netdevice.h> 28 + #include <linux/skbuff.h> 29 + #include <linux/types.h> 30 + #include <linux/usb.h> 31 + 26 32 /* interface from usbnet core to each USB networking link we handle */ 27 33 struct usbnet { 28 34 /* housekeeping */
+6
include/net/llc_s_st.h
··· 12 12 * See the GNU General Public License for more details. 13 13 */ 14 14 15 + #include <linux/types.h> 16 + #include <net/llc_s_ac.h> 17 + #include <net/llc_s_ev.h> 18 + 19 + struct llc_sap_state_trans; 20 + 15 21 #define LLC_NR_SAP_STATES 2 /* size of state table */ 16 22 17 23 /* structures and types */