Skip to content

Commit 5f10376

Browse files
kuba-mooPaolo Abeni
authored andcommitted
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/[email protected]/ v1 Signed-off-by: Jakub Kicinski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 4158e38 commit 5f10376

18 files changed

+57
-6
lines changed

include/linux/atm_tcp.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
#include <uapi/linux/atm_tcp.h>
1111

12+
struct atm_vcc;
13+
struct module;
1214

1315
struct atm_tcp_ops {
1416
int (*attach)(struct atm_vcc *vcc,int itf);

include/linux/dsa/tag_qca.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
#ifndef __TAG_QCA_H
44
#define __TAG_QCA_H
55

6+
#include <linux/types.h>
7+
8+
struct dsa_switch;
9+
struct sk_buff;
10+
611
#define QCA_HDR_LEN 2
712
#define QCA_HDR_VERSION 0x2
813

include/linux/hippidevice.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323

2424
#ifdef __KERNEL__
2525

26+
struct neigh_parms;
27+
struct net_device;
28+
struct sk_buff;
29+
2630
struct hippi_cb {
2731
__u32 ifield;
2832
};

include/linux/if_eql.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include <linux/timer.h>
2323
#include <linux/spinlock.h>
24+
#include <net/net_trackers.h>
2425
#include <uapi/linux/if_eql.h>
2526

2627
typedef struct slave {

include/linux/if_hsr.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#ifndef _LINUX_IF_HSR_H_
33
#define _LINUX_IF_HSR_H_
44

5+
#include <linux/types.h>
6+
7+
struct net_device;
8+
59
/* used to differentiate various protocols */
610
enum hsr_version {
711
HSR_V0 = 0,

include/linux/if_rmnet.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#ifndef _LINUX_IF_RMNET_H_
66
#define _LINUX_IF_RMNET_H_
77

8+
#include <linux/types.h>
9+
810
struct rmnet_map_header {
911
u8 flags; /* MAP_CMD_FLAG, MAP_PAD_LEN_MASK */
1012
u8 mux_id;

include/linux/if_tap.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22
#ifndef _LINUX_IF_TAP_H_
33
#define _LINUX_IF_TAP_H_
44

5+
#include <net/sock.h>
6+
#include <linux/skb_array.h>
7+
8+
struct file;
9+
struct socket;
10+
511
#if IS_ENABLED(CONFIG_TAP)
612
struct socket *tap_get_socket(struct file *);
713
struct ptr_ring *tap_get_ptr_ring(struct file *file);
814
#else
915
#include <linux/err.h>
1016
#include <linux/errno.h>
11-
struct file;
12-
struct socket;
1317
static inline struct socket *tap_get_socket(struct file *f)
1418
{
1519
return ERR_PTR(-EINVAL);
@@ -20,9 +24,6 @@ static inline struct ptr_ring *tap_get_ptr_ring(struct file *f)
2024
}
2125
#endif /* CONFIG_TAP */
2226

23-
#include <net/sock.h>
24-
#include <linux/skb_array.h>
25-
2627
/*
2728
* Maximum times a tap device can be opened. This can be used to
2829
* configure the number of receive queue, e.g. for multiqueue virtio.

include/linux/mdio/mdio-xgene.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
#ifndef __MDIO_XGENE_H__
99
#define __MDIO_XGENE_H__
1010

11+
#include <linux/bits.h>
12+
#include <linux/spinlock.h>
13+
#include <linux/types.h>
14+
1115
#define BLOCK_XG_MDIO_CSR_OFFSET 0x5000
1216
#define BLOCK_DIAG_CSR_OFFSET 0xd000
1317
#define XGENET_CONFIG_REG_ADDR 0x20

include/linux/nl802154.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#ifndef NL802154_H
99
#define NL802154_H
1010

11+
#include <net/netlink.h>
12+
1113
#define IEEE802154_NL_NAME "802.15.4 MAC"
1214
#define IEEE802154_MCAST_COORD_NAME "coordinator"
1315
#define IEEE802154_MCAST_BEACON_NAME "beacon"

include/linux/phy_fixed.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#ifndef __PHY_FIXED_H
33
#define __PHY_FIXED_H
44

5+
#include <linux/types.h>
6+
57
struct fixed_phy_status {
68
int link;
79
int speed;
@@ -12,6 +14,7 @@ struct fixed_phy_status {
1214

1315
struct device_node;
1416
struct gpio_desc;
17+
struct net_device;
1518

1619
#if IS_ENABLED(CONFIG_FIXED_PHY)
1720
extern int fixed_phy_change_carrier(struct net_device *dev, bool new_carrier);

include/linux/ppp-comp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include <uapi/linux/ppp-comp.h>
1111

12-
12+
struct compstat;
1313
struct module;
1414

1515
/*

include/linux/ppp_channel.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include <linux/poll.h>
2121
#include <net/net_namespace.h>
2222

23+
struct net_device_path;
24+
struct net_device_path_ctx;
2325
struct ppp_channel;
2426

2527
struct ppp_channel_ops {

include/linux/ptp_kvm.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#ifndef _PTP_KVM_H_
99
#define _PTP_KVM_H_
1010

11+
#include <linux/types.h>
12+
1113
struct timespec64;
1214
struct clocksource;
1315

include/linux/ptp_pch.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#ifndef _PTP_PCH_H_
1111
#define _PTP_PCH_H_
1212

13+
#include <linux/types.h>
14+
15+
struct pci_dev;
16+
1317
void pch_ch_control_write(struct pci_dev *pdev, u32 val);
1418
u32 pch_ch_event_read(struct pci_dev *pdev);
1519
void pch_ch_event_write(struct pci_dev *pdev, u32 val);

include/linux/seq_file_net.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#define __SEQ_FILE_NET_H__
44

55
#include <linux/seq_file.h>
6+
#include <net/net_trackers.h>
67

78
struct net;
89
extern struct net init_net;

include/linux/sungem_phy.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#ifndef __SUNGEM_PHY_H__
33
#define __SUNGEM_PHY_H__
44

5+
#include <linux/types.h>
6+
57
struct mii_phy;
68

79
/* Operations supported by any kind of PHY */

include/linux/usb/usbnet.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
#ifndef __LINUX_USB_USBNET_H
2424
#define __LINUX_USB_USBNET_H
2525

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+
2632
/* interface from usbnet core to each USB networking link we handle */
2733
struct usbnet {
2834
/* housekeeping */

include/net/llc_s_st.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
* See the GNU General Public License for more details.
1313
*/
1414

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+
1521
#define LLC_NR_SAP_STATES 2 /* size of state table */
1622

1723
/* structures and types */

0 commit comments

Comments
 (0)