net: hns3: fix hns3 driver header file not self-contained issue
authorJie Wang <wangjie125@huawei.com>
Fri, 3 Dec 2021 09:20:59 +0000 (17:20 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Dec 2021 11:01:00 +0000 (11:01 +0000)
The hns3 driver header file uses the structure of other files, but does
not include corresponding file, which causes a check warning that the
header file is not self-contained.

Therefore, the required header file is included in the header file, and
the structure declaration is added to the header file to avoid cyclic
dependency of the header file.

Signed-off-by: Jie Wang <wangjie125@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.h
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h

index bd8801065e024823afb6f2f6d3d559ded8721551..83aa1450ab9fe383bd31e979a885131329e4bf6a 100644 (file)
@@ -4,6 +4,8 @@
 #ifndef __HNS3_DEBUGFS_H
 #define __HNS3_DEBUGFS_H
 
+#include "hnae3.h"
+
 #define HNS3_DBG_READ_LEN      65536
 #define HNS3_DBG_READ_LEN_128KB        0x20000
 #define HNS3_DBG_READ_LEN_1MB  0x100000
index 2803b2cd7f30ba6e2f67820f32de0d1439ff67f3..a05a0c7423ce4d707672acf39820ae92647e861b 100644 (file)
@@ -10,6 +10,9 @@
 
 #include "hnae3.h"
 
+struct iphdr;
+struct ipv6hdr;
+
 enum hns3_nic_state {
        HNS3_NIC_STATE_TESTING,
        HNS3_NIC_STATE_RESETTING,
index fd0e20190b90f1109a14813c49b5d89609d4212d..4200d0b6d9317bac879d7eed9a5636f1557d57ab 100644 (file)
@@ -4,6 +4,10 @@
 #ifndef __HCLGE_MDIO_H
 #define __HCLGE_MDIO_H
 
+#include "hnae3.h"
+
+struct hclge_dev;
+
 int hclge_mac_mdio_config(struct hclge_dev *hdev);
 int hclge_mac_connect_phy(struct hnae3_handle *handle);
 void hclge_mac_disconnect_phy(struct hnae3_handle *handle);
index 7a9b77de632aa0daecf2838ac8061d536a99b3aa..bbee74cd8404b9ddda3773f4b1140f265ecb311f 100644 (file)
@@ -8,6 +8,9 @@
 #include <linux/net_tstamp.h>
 #include <linux/types.h>
 
+struct hclge_dev;
+struct ifreq;
+
 #define HCLGE_PTP_REG_OFFSET   0x29000
 
 #define HCLGE_PTP_TX_TS_SEQID_REG      0x0
index 1db7f40b4525512e6af84853e28811cf2e6b7c07..619cc30a2dfcc2804312b6d110818c10599287bd 100644 (file)
@@ -6,6 +6,12 @@
 
 #include <linux/types.h>
 
+#include "hnae3.h"
+
+struct hclge_dev;
+struct hclge_vport;
+enum hclge_opcode_type;
+
 /* MAC Pause */
 #define HCLGE_TX_MAC_PAUSE_EN_MSK      BIT(0)
 #define HCLGE_RX_MAC_PAUSE_EN_MSK      BIT(1)