DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dongdong Liu <liudongdong3@huawei.com>
To: <dev@dpdk.org>, <andrew.rybchenko@oktetlabs.ru>,
	<ferruh.yigit@amd.com>, <thomas@monjalon.net>
Cc: <stable@dpdk.org>, <fengchengwen@huawei.com>,
	<yisen.zhuang@huawei.com>, <liudongdong3@huawei.com>,
	<lihuisong@huawei.com>, <haijie1@huawei.com>
Subject: [PATCH 12/19] net/hns3: do not use reserved identifier macro
Date: Fri, 30 Sep 2022 15:22:13 +0800	[thread overview]
Message-ID: <20220930072220.20753-13-liudongdong3@huawei.com> (raw)
In-Reply-To: <20220930072220.20753-1-liudongdong3@huawei.com>

From: Chengwen Feng <fengchengwen@huawei.com>

Currently, the hns3 driver uses _HNS3_XXX conditional compilation
macros to prevent duplicate header files. But in the C11 standard, all
identifiers starting with an underscore plus an uppercase letter are
always reserved. So this patch fixes it.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_cmd.h           | 6 +++---
 drivers/net/hns3/hns3_common.h        | 6 +++---
 drivers/net/hns3/hns3_dcb.h           | 6 +++---
 drivers/net/hns3/hns3_dump.h          | 6 +++---
 drivers/net/hns3/hns3_ethdev.h        | 6 +++---
 drivers/net/hns3/hns3_fdir.h          | 6 +++---
 drivers/net/hns3/hns3_flow.h          | 6 +++---
 drivers/net/hns3/hns3_intr.h          | 6 +++---
 drivers/net/hns3/hns3_logs.h          | 6 +++---
 drivers/net/hns3/hns3_mbx.h           | 6 +++---
 drivers/net/hns3/hns3_mp.h            | 6 +++---
 drivers/net/hns3/hns3_regs.h          | 6 +++---
 drivers/net/hns3/hns3_rss.h           | 6 +++---
 drivers/net/hns3/hns3_rxtx.h          | 6 +++---
 drivers/net/hns3/hns3_rxtx_vec.h      | 6 +++---
 drivers/net/hns3/hns3_rxtx_vec_neon.h | 6 +++---
 drivers/net/hns3/hns3_stats.h         | 6 +++---
 drivers/net/hns3/hns3_tm.h            | 6 +++---
 18 files changed, 54 insertions(+), 54 deletions(-)

diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index 902638ba99..8ac8b45819 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
-#ifndef _HNS3_CMD_H_
-#define _HNS3_CMD_H_
+#ifndef HNS3_CMD_H
+#define HNS3_CMD_H
 
 #include <stdint.h>
 
@@ -1038,4 +1038,4 @@ int hns3_cmd_init(struct hns3_hw *hw);
 void hns3_cmd_destroy_queue(struct hns3_hw *hw);
 void hns3_cmd_uninit(struct hns3_hw *hw);
 
-#endif /* _HNS3_CMD_H_ */
+#endif /* HNS3_CMD_H */
diff --git a/drivers/net/hns3/hns3_common.h b/drivers/net/hns3/hns3_common.h
index 2994e4a269..5aa001f0cc 100644
--- a/drivers/net/hns3/hns3_common.h
+++ b/drivers/net/hns3/hns3_common.h
@@ -2,8 +2,8 @@
  * Copyright(C) 2021 HiSilicon Limited
  */
 
-#ifndef _HNS3_COMMON_H_
-#define _HNS3_COMMON_H_
+#ifndef HNS3_COMMON_H
+#define HNS3_COMMON_H
 
 #include <sys/time.h>
 
@@ -61,4 +61,4 @@ int hns3_restore_rx_interrupt(struct hns3_hw *hw);
 
 int hns3_get_pci_revision_id(struct hns3_hw *hw, uint8_t *revision_id);
 
-#endif /* _HNS3_COMMON_H_ */
+#endif /* HNS3_COMMON_H */
diff --git a/drivers/net/hns3/hns3_dcb.h b/drivers/net/hns3/hns3_dcb.h
index 9d9e7684c1..d5bb5edf4d 100644
--- a/drivers/net/hns3/hns3_dcb.h
+++ b/drivers/net/hns3/hns3_dcb.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
-#ifndef _HNS3_DCB_H_
-#define _HNS3_DCB_H_
+#ifndef HNS3_DCB_H
+#define HNS3_DCB_H
 
 #include <stdint.h>
 
@@ -215,4 +215,4 @@ int hns3_update_queue_map_configure(struct hns3_adapter *hns);
 int hns3_port_shaper_update(struct hns3_hw *hw, uint32_t speed);
 uint8_t hns3_txq_mapped_tc_get(struct hns3_hw *hw, uint16_t txq_no);
 
-#endif /* _HNS3_DCB_H_ */
+#endif /* HNS3_DCB_H */
diff --git a/drivers/net/hns3/hns3_dump.h b/drivers/net/hns3/hns3_dump.h
index b0fe37ee21..43e983a42f 100644
--- a/drivers/net/hns3/hns3_dump.h
+++ b/drivers/net/hns3/hns3_dump.h
@@ -2,12 +2,12 @@
  * Copyright(C) 2022 HiSilicon Limited
  */
 
-#ifndef _HNS3_DUMP_H_
-#define _HNS3_DUMP_H_
+#ifndef HNS3_DUMP_H
+#define HNS3_DUMP_H
 
 #include <stdio.h>
 
 #include <ethdev_driver.h>
 
 int hns3_eth_dev_priv_dump(struct rte_eth_dev *dev, FILE *file);
-#endif /* _HNS3_DUMP_H_ */
+#endif /* HNS3_DUMP_H */
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index bd5fc689f8..9fe9766736 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
-#ifndef _HNS3_ETHDEV_H_
-#define _HNS3_ETHDEV_H_
+#ifndef HNS3_ETHDEV_H
+#define HNS3_ETHDEV_H
 
 #include <pthread.h>
 #include <ethdev_driver.h>
@@ -1074,4 +1074,4 @@ is_reset_pending(struct hns3_adapter *hns)
 	return ret;
 }
 
-#endif /* _HNS3_ETHDEV_H_ */
+#endif /* HNS3_ETHDEV_H */
diff --git a/drivers/net/hns3/hns3_fdir.h b/drivers/net/hns3/hns3_fdir.h
index 1a14f1eceb..ce70a534dc 100644
--- a/drivers/net/hns3/hns3_fdir.h
+++ b/drivers/net/hns3/hns3_fdir.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
-#ifndef _HNS3_FDIR_H_
-#define _HNS3_FDIR_H_
+#ifndef HNS3_FDIR_H
+#define HNS3_FDIR_H
 
 #include <stdint.h>
 
@@ -192,4 +192,4 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns);
 int hns3_fd_get_count(struct hns3_hw *hw, uint32_t id, uint64_t *value);
 int hns3_restore_all_fdir_filter(struct hns3_adapter *hns);
 
-#endif /* _HNS3_FDIR_H_ */
+#endif /* HNS3_FDIR_H */
diff --git a/drivers/net/hns3/hns3_flow.h b/drivers/net/hns3/hns3_flow.h
index ec94510152..e4b2fdf2e6 100644
--- a/drivers/net/hns3/hns3_flow.h
+++ b/drivers/net/hns3/hns3_flow.h
@@ -2,8 +2,8 @@
  * Copyright(C) 2021 HiSilicon Limited
  */
 
-#ifndef _HNS3_FLOW_H_
-#define _HNS3_FLOW_H_
+#ifndef HNS3_FLOW_H
+#define HNS3_FLOW_H
 
 #include <rte_flow.h>
 #include <ethdev_driver.h>
@@ -54,4 +54,4 @@ void hns3_flow_init(struct rte_eth_dev *dev);
 void hns3_flow_uninit(struct rte_eth_dev *dev);
 int hns3_restore_filter(struct hns3_adapter *hns);
 
-#endif /* _HNS3_FLOW_H_ */
+#endif /* HNS3_FLOW_H */
diff --git a/drivers/net/hns3/hns3_intr.h b/drivers/net/hns3/hns3_intr.h
index 1490a5e387..aca1c0722c 100644
--- a/drivers/net/hns3/hns3_intr.h
+++ b/drivers/net/hns3/hns3_intr.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
-#ifndef _HNS3_INTR_H_
-#define _HNS3_INTR_H_
+#ifndef HNS3_INTR_H
+#define HNS3_INTR_H
 
 #include <stdint.h>
 
@@ -190,4 +190,4 @@ void hns3_reset_abort(struct hns3_adapter *hns);
 void hns3_start_report_lse(struct rte_eth_dev *dev);
 void hns3_stop_report_lse(struct rte_eth_dev *dev);
 
-#endif /* _HNS3_INTR_H_ */
+#endif /* HNS3_INTR_H */
diff --git a/drivers/net/hns3/hns3_logs.h b/drivers/net/hns3/hns3_logs.h
index 072a53bd69..c880f752ab 100644
--- a/drivers/net/hns3/hns3_logs.h
+++ b/drivers/net/hns3/hns3_logs.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
-#ifndef _HNS3_LOGS_H_
-#define _HNS3_LOGS_H_
+#ifndef HNS3_LOGS_H
+#define HNS3_LOGS_H
 
 extern int hns3_logtype_init;
 #define PMD_INIT_LOG(level, fmt, args...) \
@@ -31,4 +31,4 @@ extern int hns3_logtype_driver;
 #define hns3_dbg(hw, fmt, args...) \
 	PMD_DRV_LOG_RAW(hw, RTE_LOG_DEBUG, fmt "\n", ## args)
 
-#endif /* _HNS3_LOGS_H_ */
+#endif /* HNS3_LOGS_H */
diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
index 97f704426c..c378783c6c 100644
--- a/drivers/net/hns3/hns3_mbx.h
+++ b/drivers/net/hns3/hns3_mbx.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
-#ifndef _HNS3_MBX_H_
-#define _HNS3_MBX_H_
+#ifndef HNS3_MBX_H
+#define HNS3_MBX_H
 
 #include <stdint.h>
 
@@ -172,4 +172,4 @@ void hns3_dev_handle_mbx_msg(struct hns3_hw *hw);
 int hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
 		      const uint8_t *msg_data, uint8_t msg_len, bool need_resp,
 		      uint8_t *resp_data, uint16_t resp_len);
-#endif /* _HNS3_MBX_H_ */
+#endif /* HNS3_MBX_H */
diff --git a/drivers/net/hns3/hns3_mp.h b/drivers/net/hns3/hns3_mp.h
index 230230bbfe..5dc32a41d4 100644
--- a/drivers/net/hns3/hns3_mp.h
+++ b/drivers/net/hns3/hns3_mp.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
-#ifndef _HNS3_MP_H_
-#define _HNS3_MP_H_
+#ifndef HNS3_MP_H
+#define HNS3_MP_H
 
 #include <ethdev_driver.h>
 
@@ -21,4 +21,4 @@ void hns3_mp_req_stop_tx(struct rte_eth_dev *dev);
 int hns3_mp_init(struct rte_eth_dev *dev);
 void hns3_mp_uninit(struct rte_eth_dev *dev);
 
-#endif /* _HNS3_MP_H_ */
+#endif /* HNS3_MP_H */
diff --git a/drivers/net/hns3/hns3_regs.h b/drivers/net/hns3/hns3_regs.h
index 2636429844..459bbaf773 100644
--- a/drivers/net/hns3/hns3_regs.h
+++ b/drivers/net/hns3/hns3_regs.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
-#ifndef _HNS3_REGS_H_
-#define _HNS3_REGS_H_
+#ifndef HNS3_REGS_H
+#define HNS3_REGS_H
 
 #include <ethdev_driver.h>
 #include <rte_dev_info.h>
@@ -153,4 +153,4 @@
 #define HNS3_RL_USEC_TO_REG(rl_usec)		((rl_usec) >> 2)
 
 int hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs);
-#endif /* _HNS3_REGS_H_ */
+#endif /* HNS3_REGS_H */
diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index 76b48fa994..55aafedcba 100644
--- a/drivers/net/hns3/hns3_rss.h
+++ b/drivers/net/hns3/hns3_rss.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
-#ifndef _HNS3_RSS_H_
-#define _HNS3_RSS_H_
+#ifndef HNS3_RSS_H
+#define HNS3_RSS_H
 
 #include <rte_ethdev.h>
 #include <rte_flow.h>
@@ -109,4 +109,4 @@ void hns3_rss_uninit(struct hns3_adapter *hns);
 int hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf);
 int hns3_rss_set_algo_key(struct hns3_hw *hw, const uint8_t *key);
 
-#endif /* _HNS3_RSS_H_ */
+#endif /* HNS3_RSS_H */
diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
index f2d73043b7..ea1a805491 100644
--- a/drivers/net/hns3/hns3_rxtx.h
+++ b/drivers/net/hns3/hns3_rxtx.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
-#ifndef _HNS3_RXTX_H_
-#define _HNS3_RXTX_H_
+#ifndef HNS3_RXTX_H
+#define HNS3_RXTX_H
 
 #include <stdint.h>
 
@@ -777,4 +777,4 @@ void hns3_tx_push_init(struct rte_eth_dev *dev);
 void hns3_stop_tx_datapath(struct rte_eth_dev *dev);
 void hns3_start_tx_datapath(struct rte_eth_dev *dev);
 
-#endif /* _HNS3_RXTX_H_ */
+#endif /* HNS3_RXTX_H */
diff --git a/drivers/net/hns3/hns3_rxtx_vec.h b/drivers/net/hns3/hns3_rxtx_vec.h
index d13f18627d..2c8a91921e 100644
--- a/drivers/net/hns3/hns3_rxtx_vec.h
+++ b/drivers/net/hns3/hns3_rxtx_vec.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2020-2021 HiSilicon Limited.
  */
 
-#ifndef _HNS3_RXTX_VEC_H_
-#define _HNS3_RXTX_VEC_H_
+#ifndef HNS3_RXTX_VEC_H
+#define HNS3_RXTX_VEC_H
 
 #include "hns3_rxtx.h"
 #include "hns3_ethdev.h"
@@ -94,4 +94,4 @@ hns3_rx_reassemble_pkts(struct rte_mbuf **rx_pkts,
 
 	return count;
 }
-#endif /* _HNS3_RXTX_VEC_H_ */
+#endif /* HNS3_RXTX_VEC_H */
diff --git a/drivers/net/hns3/hns3_rxtx_vec_neon.h b/drivers/net/hns3/hns3_rxtx_vec_neon.h
index 0edd4756f1..55d9bf817d 100644
--- a/drivers/net/hns3/hns3_rxtx_vec_neon.h
+++ b/drivers/net/hns3/hns3_rxtx_vec_neon.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2020-2021 HiSilicon Limited.
  */
 
-#ifndef _HNS3_RXTX_VEC_NEON_H_
-#define _HNS3_RXTX_VEC_NEON_H_
+#ifndef HNS3_RXTX_VEC_NEON_H
+#define HNS3_RXTX_VEC_NEON_H
 
 #include <arm_neon.h>
 
@@ -299,4 +299,4 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq,
 
 	return nb_rx;
 }
-#endif /* _HNS3_RXTX_VEC_NEON_H_ */
+#endif /* HNS3_RXTX_VEC_NEON_H */
diff --git a/drivers/net/hns3/hns3_stats.h b/drivers/net/hns3/hns3_stats.h
index 9a360f8870..74bc4173cc 100644
--- a/drivers/net/hns3/hns3_stats.h
+++ b/drivers/net/hns3/hns3_stats.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
-#ifndef _HNS3_STATS_H_
-#define _HNS3_STATS_H_
+#ifndef HNS3_STATS_H
+#define HNS3_STATS_H
 
 #include <ethdev_driver.h>
 #include <rte_ethdev.h>
@@ -172,4 +172,4 @@ void hns3_stats_uninit(struct hns3_hw *hw);
 int hns3_query_mac_stats_reg_num(struct hns3_hw *hw);
 void hns3_update_hw_stats(struct hns3_hw *hw);
 
-#endif /* _HNS3_STATS_H_ */
+#endif /* HNS3_STATS_H */
diff --git a/drivers/net/hns3/hns3_tm.h b/drivers/net/hns3/hns3_tm.h
index 47345eeed1..0cac1a5bb2 100644
--- a/drivers/net/hns3/hns3_tm.h
+++ b/drivers/net/hns3/hns3_tm.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2020-2021 HiSilicon Limited.
  */
 
-#ifndef _HNS3_TM_H_
-#define _HNS3_TM_H_
+#ifndef HNS3_TM_H
+#define HNS3_TM_H
 
 #include <stdint.h>
 #include <rte_tailq.h>
@@ -114,4 +114,4 @@ void hns3_tm_dev_start_proc(struct hns3_hw *hw);
 void hns3_tm_dev_stop_proc(struct hns3_hw *hw);
 int hns3_tm_conf_update(struct hns3_hw *hw);
 
-#endif /* _HNS3_TM_H */
+#endif /* HNS3_TM_H */
-- 
2.22.0


  parent reply	other threads:[~2022-09-30  7:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-30  7:22 [PATCH 00/19] some bugfixes and clean code for hns3 - part2 Dongdong Liu
2022-09-30  7:22 ` [PATCH 01/19] net/hns3: fix have no valid RSS rule Dongdong Liu
2022-09-30  7:22 ` [PATCH 02/19] net/hns3: fix RSS filter restore Dongdong Liu
2022-09-30  7:22 ` [PATCH 03/19] net/hns3: fix the lock protection of RSS flow rule Dongdong Liu
2022-09-30  7:22 ` [PATCH 04/19] net/hns3: fix RSS flow rule restore failed Dongdong Liu
2022-09-30  7:22 ` [PATCH 05/19] net/hns3: move flow direction rule recovery position Dongdong Liu
2022-09-30  7:22 ` [PATCH 06/19] net/hns3: fix hns3 restore filter function input Dongdong Liu
2022-09-30  7:22 ` [PATCH 07/19] net/hns3: fix gcov compile warning Dongdong Liu
2022-09-30  7:22 ` [PATCH 08/19] net/hns3: fix incorrect packet type report for GENEVE Dongdong Liu
2022-09-30  7:22 ` [PATCH 09/19] net/hns3: fix magic numbers Dongdong Liu
2022-09-30  7:22 ` [PATCH 10/19] net/hns3: fix header file self contained Dongdong Liu
2022-09-30  7:22 ` [PATCH 11/19] net/hns3: remove unused structure definition Dongdong Liu
2022-09-30  7:22 ` Dongdong Liu [this message]
2022-09-30  7:22 ` [PATCH 13/19] net/hns3: fix fail to enable IPV4 or IPV6 packet RSS Dongdong Liu
2022-09-30  7:22 ` [PATCH 14/19] net/hns3: fix some spelling errors Dongdong Liu
2022-09-30  7:22 ` [PATCH 15/19] net/hns3: fix inconsistent RSS behavior Dongdong Liu
2022-09-30  7:22 ` [PATCH 16/19] net/hns3: add check for L3 and L4 type Dongdong Liu
2022-09-30  7:22 ` [PATCH 17/19] net/hns3: revert fix mailbox communication with HW Dongdong Liu
2022-09-30  7:22 ` [PATCH 18/19] net/hns3: fix VF mark wrong message processed Dongdong Liu
2022-09-30  7:22 ` [PATCH 19/19] net/hns3: fix the obtaination of minimum Tx frame length Dongdong Liu
2022-10-05  6:18 ` [PATCH 00/19] some bugfixes and clean code for hns3 - part2 Andrew Rybchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220930072220.20753-13-liudongdong3@huawei.com \
    --to=liudongdong3@huawei.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=ferruh.yigit@amd.com \
    --cc=haijie1@huawei.com \
    --cc=lihuisong@huawei.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=yisen.zhuang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).