From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Junlong Wang <wang.junlong1@zte.com.cn>,
Lijie Shan <shan.lijie@zte.com.cn>
Subject: [RFC 1/5] net/zxdh: remove __rte_unused from function prototypes
Date: Sat, 22 Feb 2025 18:42:20 -0800 [thread overview]
Message-ID: <20250223024334.1216477-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20250223024334.1216477-1-stephen@networkplumber.org>
The unused attribute needs to be used on the function definition
only. It is meaningless on function prototype.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/zxdh/zxdh_ethdev_ops.h | 10 ++++------
drivers/net/zxdh/zxdh_mtr.h | 4 ++--
drivers/net/zxdh/zxdh_np.h | 2 +-
drivers/net/zxdh/zxdh_queue.h | 4 ++--
drivers/net/zxdh/zxdh_rxtx.h | 6 ++----
5 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/drivers/net/zxdh/zxdh_ethdev_ops.h b/drivers/net/zxdh/zxdh_ethdev_ops.h
index ead571067c..6c3fb83ea4 100644
--- a/drivers/net/zxdh/zxdh_ethdev_ops.h
+++ b/drivers/net/zxdh/zxdh_ethdev_ops.h
@@ -74,7 +74,7 @@ struct zxdh_hw_vqm_stats {
int zxdh_dev_set_link_up(struct rte_eth_dev *dev);
int zxdh_dev_set_link_down(struct rte_eth_dev *dev);
-int32_t zxdh_dev_link_update(struct rte_eth_dev *dev, int32_t wait_to_complete __rte_unused);
+int32_t zxdh_dev_link_update(struct rte_eth_dev *dev, int32_t wait_to_complete);
int zxdh_dev_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
uint32_t index, uint32_t vmdq);
int zxdh_dev_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr);
@@ -101,13 +101,11 @@ int zxdh_hw_np_stats_pf_reset(struct rte_eth_dev *dev, uint32_t stats_id);
void zxdh_data_hi_to_lo(uint64_t *data);
int32_t zxdh_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, uint32_t n);
int32_t zxdh_dev_xstats_get_names(struct rte_eth_dev *dev,
- struct rte_eth_xstat_name *xstats_names,
- __rte_unused unsigned int limit);
-int zxdh_dev_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
- size_t fw_size __rte_unused);
+ struct rte_eth_xstat_name *xstats_names, unsigned int limit);
+int zxdh_dev_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size);
int zxdh_dev_get_module_info(struct rte_eth_dev *dev,
struct rte_eth_dev_module_info *modinfo);
int zxdh_dev_get_module_eeprom(struct rte_eth_dev *dev, struct rte_dev_eeprom_info *info);
-int zxdh_meter_ops_get(struct rte_eth_dev *dev __rte_unused, void *arg);
+int zxdh_meter_ops_get(struct rte_eth_dev *dev, void *arg);
#endif /* ZXDH_ETHDEV_OPS_H */
diff --git a/drivers/net/zxdh/zxdh_mtr.h b/drivers/net/zxdh/zxdh_mtr.h
index 51ddc0840b..749ceb7479 100644
--- a/drivers/net/zxdh/zxdh_mtr.h
+++ b/drivers/net/zxdh/zxdh_mtr.h
@@ -100,8 +100,8 @@ struct zxdh_hw_mtr_stats {
uint32_t n_bytes_dropped_lo;
};
-int zxdh_meter_ops_get(struct rte_eth_dev *dev __rte_unused, void *arg);
-void zxdh_mtr_release(struct rte_eth_dev *dev __rte_unused);
+int zxdh_meter_ops_get(struct rte_eth_dev *dev, void *arg);
+void zxdh_mtr_release(struct rte_eth_dev *dev);
void zxdh_mtr_policy_res_free(struct rte_mempool *mtr_policy_mp, struct zxdh_meter_policy *policy);
int zxdh_hw_profile_unref(struct rte_eth_dev *dev,
uint8_t car_type,
diff --git a/drivers/net/zxdh/zxdh_np.h b/drivers/net/zxdh/zxdh_np.h
index 63ebd12c18..3e2d99c9be 100644
--- a/drivers/net/zxdh/zxdh_np.h
+++ b/drivers/net/zxdh/zxdh_np.h
@@ -824,7 +824,7 @@ uint32_t
zxdh_np_car_profile_id_add(uint32_t vport_id,
uint32_t flags,
uint64_t *p_profile_id);
-uint32_t zxdh_np_car_profile_cfg_set(__rte_unused uint32_t vport_id,
+uint32_t zxdh_np_car_profile_cfg_set(uint32_t vport_id,
uint32_t car_type,
uint32_t pkt_sign,
uint32_t profile_id,
diff --git a/drivers/net/zxdh/zxdh_queue.h b/drivers/net/zxdh/zxdh_queue.h
index 05f391f080..1a54e7cfc9 100644
--- a/drivers/net/zxdh/zxdh_queue.h
+++ b/drivers/net/zxdh/zxdh_queue.h
@@ -410,12 +410,12 @@ int32_t zxdh_get_queue_type(uint16_t vtpci_queue_idx);
int32_t zxdh_dev_tx_queue_setup(struct rte_eth_dev *dev,
uint16_t queue_idx,
uint16_t nb_desc,
- uint32_t socket_id __rte_unused,
+ uint32_t socket_id,
const struct rte_eth_txconf *tx_conf);
int32_t zxdh_dev_rx_queue_setup(struct rte_eth_dev *dev,
uint16_t queue_idx,
uint16_t nb_desc,
- uint32_t socket_id __rte_unused,
+ uint32_t socket_id,
const struct rte_eth_rxconf *rx_conf,
struct rte_mempool *mp);
int32_t zxdh_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id);
diff --git a/drivers/net/zxdh/zxdh_rxtx.h b/drivers/net/zxdh/zxdh_rxtx.h
index 111c5bcf65..424048607e 100644
--- a/drivers/net/zxdh/zxdh_rxtx.h
+++ b/drivers/net/zxdh/zxdh_rxtx.h
@@ -73,9 +73,7 @@ struct __rte_cache_aligned zxdh_virtnet_tx {
};
uint16_t zxdh_xmit_pkts_packed(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts);
-uint16_t zxdh_xmit_pkts_prepare(void *tx_queue __rte_unused, struct rte_mbuf **tx_pkts,
- uint16_t nb_pkts);
-uint16_t zxdh_recv_pkts_packed(void *rx_queue, struct rte_mbuf **rx_pkts,
- uint16_t nb_pkts);
+uint16_t zxdh_xmit_pkts_prepare(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts);
+uint16_t zxdh_recv_pkts_packed(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts);
#endif /* ZXDH_RXTX_H */
--
2.47.2
next prev parent reply other threads:[~2025-02-23 2:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-23 2:42 [RFC 0/5] net/zxdh: possible changes Stephen Hemminger
2025-02-23 2:42 ` Stephen Hemminger [this message]
2025-02-23 2:42 ` [RFC 2/5] net/zxdh: remove __rte_unused attribute Stephen Hemminger
2025-02-23 2:42 ` [RFC 3/5] net/zxdh: fix RTE_ASSERT expression Stephen Hemminger
2025-02-23 2:42 ` [RFC 4/5] net/zxdh: make callback table const and static Stephen Hemminger
2025-02-23 2:42 ` [RFC 5/5] net/zxdh: fix indentation in mtr get and use assign Stephen Hemminger
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=20250223024334.1216477-2-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=shan.lijie@zte.com.cn \
--cc=wang.junlong1@zte.com.cn \
/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).