[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220927111205.18060-3-huangguangbin2@huawei.com>
Date: Tue, 27 Sep 2022 19:12:03 +0800
From: Guangbin Huang <huangguangbin2@...wei.com>
To: <davem@...emloft.net>, <kuba@...nel.org>
CC: <edumazet@...gle.com>, <pabeni@...hat.com>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<huangguangbin2@...wei.com>, <shenjian15@...wei.com>,
<lanhao@...wei.com>
Subject: [PATCH net-next 2/4] net: hns3: fix hns3 driver header file not self-contained issue
From: Hao Chen <chenhao418@...wei.com>
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: Hao Chen <chenhao418@...wei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@...wei.com>
---
drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h | 4 +++-
.../hisilicon/hns3/hns3_common/hclge_comm_tqp_stats.h | 2 ++
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 3 +++
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.h | 5 ++++-
4 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h b/drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h
index abcd7877f7d2..487216aeae50 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h
@@ -7,6 +7,8 @@
#include <linux/mutex.h>
#include <linux/types.h>
+struct hclgevf_dev;
+
enum HCLGE_MBX_OPCODE {
HCLGE_MBX_RESET = 0x01, /* (VF -> PF) assert reset */
HCLGE_MBX_ASSERTING_RESET, /* (PF -> VF) PF is asserting reset */
@@ -233,7 +235,7 @@ struct hclgevf_mbx_arq_ring {
__le16 msg_q[HCLGE_MBX_MAX_ARQ_MSG_NUM][HCLGE_MBX_MAX_ARQ_MSG_SIZE];
};
-struct hclge_dev;
+struct hclge_vport;
#define HCLGE_MBX_OPCODE_MAX 256
struct hclge_mbx_ops_param {
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_tqp_stats.h b/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_tqp_stats.h
index a46350162ee8..7aff1a544cf4 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_tqp_stats.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_tqp_stats.h
@@ -7,6 +7,8 @@
#include <linux/etherdevice.h>
#include "hnae3.h"
+struct hclge_comm_hw;
+
/* each tqp has TX & RX two queues */
#define HCLGE_COMM_QUEUE_PAIR_SIZE 2
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
index 133a054af6b7..557a5fa70d0a 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
@@ -13,6 +13,9 @@
struct iphdr;
struct ipv6hdr;
+struct gre_base_hdr;
+struct tcphdr;
+struct udphdr;
enum hns3_nic_state {
HNS3_NIC_STATE_TESTING,
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.h
index bbee74cd8404..bceb61c791a1 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.h
@@ -8,8 +8,11 @@
#include <linux/net_tstamp.h>
#include <linux/types.h>
-struct hclge_dev;
struct ifreq;
+struct ethtool_ts_info;
+
+struct hnae3_handle;
+struct hclge_dev;
#define HCLGE_PTP_REG_OFFSET 0x29000
--
2.33.0
Powered by blists - more mailing lists