]> www.infradead.org Git - users/hch/misc.git/commitdiff
add missing includes and forward declarations to networking includes under linux/
authorJakub Kicinski <kuba@kernel.org>
Tue, 26 Jul 2022 21:56:52 +0000 (14:56 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 28 Jul 2022 09:29:36 +0000 (11:29 +0200)
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/
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>
18 files changed:
include/linux/atm_tcp.h
include/linux/dsa/tag_qca.h
include/linux/hippidevice.h
include/linux/if_eql.h
include/linux/if_hsr.h
include/linux/if_rmnet.h
include/linux/if_tap.h
include/linux/mdio/mdio-xgene.h
include/linux/nl802154.h
include/linux/phy_fixed.h
include/linux/ppp-comp.h
include/linux/ppp_channel.h
include/linux/ptp_kvm.h
include/linux/ptp_pch.h
include/linux/seq_file_net.h
include/linux/sungem_phy.h
include/linux/usb/usbnet.h
include/net/llc_s_st.h

index c8ecf6f68fb508ff6c76a3aa23192fdc1fa3dbcf..2558439d849b07582d45abfaa47d943fa515fce3 100644 (file)
@@ -9,6 +9,8 @@
 
 #include <uapi/linux/atm_tcp.h>
 
+struct atm_vcc;
+struct module;
 
 struct atm_tcp_ops {
        int (*attach)(struct atm_vcc *vcc,int itf);
index 4359fb0221cf84d89afefa78f5c807a2fc935841..50be7cbd93a5b1ca08d6c51a4b4aca3ad97d54b3 100644 (file)
@@ -3,6 +3,11 @@
 #ifndef __TAG_QCA_H
 #define __TAG_QCA_H
 
+#include <linux/types.h>
+
+struct dsa_switch;
+struct sk_buff;
+
 #define QCA_HDR_LEN    2
 #define QCA_HDR_VERSION        0x2
 
index 9dc01f7ab5b4c8031229f1b6601178604f428db7..07414c241e65ecb08b451d99ceeb52a6a3acd7a9 100644 (file)
 
 #ifdef __KERNEL__
 
+struct neigh_parms;
+struct net_device;
+struct sk_buff;
+
 struct hippi_cb {
        __u32   ifield;
 };
index d75601d613cc6859b692ab3a41b55893e5921dd9..07f9b660b7417b938628c44913b096d035a07967 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <linux/timer.h>
 #include <linux/spinlock.h>
+#include <net/net_trackers.h>
 #include <uapi/linux/if_eql.h>
 
 typedef struct slave {
index 408539d5ea5f339d4889bdb476f3e343ea5b86ec..0404f5bf4f30f46becc306a9ee9a70b69a521ca3 100644 (file)
@@ -2,6 +2,10 @@
 #ifndef _LINUX_IF_HSR_H_
 #define _LINUX_IF_HSR_H_
 
+#include <linux/types.h>
+
+struct net_device;
+
 /* used to differentiate various protocols */
 enum hsr_version {
        HSR_V0 = 0,
index 10e7521ecb6cddf210f8a5f9792594000faacfdf..839d1e48b85e99b7b2f8a4fbd2c36167fc8b3078 100644 (file)
@@ -5,6 +5,8 @@
 #ifndef _LINUX_IF_RMNET_H_
 #define _LINUX_IF_RMNET_H_
 
+#include <linux/types.h>
+
 struct rmnet_map_header {
        u8 flags;                       /* MAP_CMD_FLAG, MAP_PAD_LEN_MASK */
        u8 mux_id;
index 915a187cfabdac61da21a58c9ab00862c9deaae8..553552fa635c3e1e53d1a63c203d32e4c4fd5a4f 100644 (file)
@@ -2,14 +2,18 @@
 #ifndef _LINUX_IF_TAP_H_
 #define _LINUX_IF_TAP_H_
 
+#include <net/sock.h>
+#include <linux/skb_array.h>
+
+struct file;
+struct socket;
+
 #if IS_ENABLED(CONFIG_TAP)
 struct socket *tap_get_socket(struct file *);
 struct ptr_ring *tap_get_ptr_ring(struct file *file);
 #else
 #include <linux/err.h>
 #include <linux/errno.h>
-struct file;
-struct socket;
 static inline struct socket *tap_get_socket(struct file *f)
 {
        return ERR_PTR(-EINVAL);
@@ -20,9 +24,6 @@ static inline struct ptr_ring *tap_get_ptr_ring(struct file *f)
 }
 #endif /* CONFIG_TAP */
 
-#include <net/sock.h>
-#include <linux/skb_array.h>
-
 /*
  * Maximum times a tap device can be opened. This can be used to
  * configure the number of receive queue, e.g. for multiqueue virtio.
index 8af93ada8b644baac14cb7c6d9c1b457349d6520..9e588965dc83c811182c055cbf479a123acdc3dc 100644 (file)
@@ -8,6 +8,10 @@
 #ifndef __MDIO_XGENE_H__
 #define __MDIO_XGENE_H__
 
+#include <linux/bits.h>
+#include <linux/spinlock.h>
+#include <linux/types.h>
+
 #define BLOCK_XG_MDIO_CSR_OFFSET       0x5000
 #define BLOCK_DIAG_CSR_OFFSET          0xd000
 #define XGENET_CONFIG_REG_ADDR         0x20
index b22782225f2723baf660fc971457c8c354ee71e2..cbe5fd1dd2e78e5d0f0c6d6af8e0751b23df8f3b 100644 (file)
@@ -8,6 +8,8 @@
 #ifndef NL802154_H
 #define NL802154_H
 
+#include <net/netlink.h>
+
 #define IEEE802154_NL_NAME "802.15.4 MAC"
 #define IEEE802154_MCAST_COORD_NAME "coordinator"
 #define IEEE802154_MCAST_BEACON_NAME "beacon"
index 52bc8e487ef7d3442b562ffd9907027e53a310c4..1acafd86ab138d033a7fe578ae0f6ee1c741b6ce 100644 (file)
@@ -2,6 +2,8 @@
 #ifndef __PHY_FIXED_H
 #define __PHY_FIXED_H
 
+#include <linux/types.h>
+
 struct fixed_phy_status {
        int link;
        int speed;
@@ -12,6 +14,7 @@ struct fixed_phy_status {
 
 struct device_node;
 struct gpio_desc;
+struct net_device;
 
 #if IS_ENABLED(CONFIG_FIXED_PHY)
 extern int fixed_phy_change_carrier(struct net_device *dev, bool new_carrier);
index 9d3ffc8f5ea67c08275b9f3ba74478b317795f88..fb847e47f1488b48cc2a11f45d3eda477b1b5045 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <uapi/linux/ppp-comp.h>
 
-
+struct compstat;
 struct module;
 
 /*
index 91f9a928344e04e8b221e81f526c14f4a03ecf3c..45e6e427ceb8a08566b0fcc1a41b0aa6a91172e0 100644 (file)
@@ -20,6 +20,8 @@
 #include <linux/poll.h>
 #include <net/net_namespace.h>
 
+struct net_device_path;
+struct net_device_path_ctx;
 struct ppp_channel;
 
 struct ppp_channel_ops {
index f960a719f0d5414994cce9c02de88547ba8c011e..c2e28deef33a8d09d4b7014731e2660016ffa8ba 100644 (file)
@@ -8,6 +8,8 @@
 #ifndef _PTP_KVM_H_
 #define _PTP_KVM_H_
 
+#include <linux/types.h>
+
 struct timespec64;
 struct clocksource;
 
index 51818198c2921945cef609b8a932a1f19f1374c6..7ba643b62c1543f2bd8d0442cedb724ce890dd4a 100644 (file)
 #ifndef _PTP_PCH_H_
 #define _PTP_PCH_H_
 
+#include <linux/types.h>
+
+struct pci_dev;
+
 void pch_ch_control_write(struct pci_dev *pdev, u32 val);
 u32  pch_ch_event_read(struct pci_dev *pdev);
 void pch_ch_event_write(struct pci_dev *pdev, u32 val);
index b97912fdbae78304be7c3c45c862dce880e08dd4..79638395bc32e6ebceb63c07564fc788bcd02043 100644 (file)
@@ -3,6 +3,7 @@
 #define __SEQ_FILE_NET_H__
 
 #include <linux/seq_file.h>
+#include <net/net_trackers.h>
 
 struct net;
 extern struct net init_net;
index 3a11fa41a13184034b7e11723ae83e2c25c121fe..c505f30e8b685f6563f71295a77b2951cdf114bd 100644 (file)
@@ -2,6 +2,8 @@
 #ifndef __SUNGEM_PHY_H__
 #define __SUNGEM_PHY_H__
 
+#include <linux/types.h>
+
 struct mii_phy;
 
 /* Operations supported by any kind of PHY */
index 1b4d72d5e8913ebd95513edf5bdbdefe0f736ed2..b42b72391a8d863f0ef965785ea3cebf86ba9ec8 100644 (file)
 #ifndef        __LINUX_USB_USBNET_H
 #define        __LINUX_USB_USBNET_H
 
+#include <linux/mii.h>
+#include <linux/netdevice.h>
+#include <linux/skbuff.h>
+#include <linux/types.h>
+#include <linux/usb.h>
+
 /* interface from usbnet core to each USB networking link we handle */
 struct usbnet {
        /* housekeeping */
index c4359e203013c097837f06ca826f3b887c21bfed..ed5b2fa40d32e89ab06cdd49b1e5deb7e1bf5920 100644 (file)
  * See the GNU General Public License for more details.
  */
 
+#include <linux/types.h>
+#include <net/llc_s_ac.h>
+#include <net/llc_s_ev.h>
+
+struct llc_sap_state_trans;
+
 #define LLC_NR_SAP_STATES      2       /* size of state table */
 
 /* structures and types */