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/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>
1 parent 4158e38 commit 5f10376

File tree

18 files changed

+57
-6
lines changed

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);

0 commit comments

Comments
 (0)