The unused attribute needs to be used on the function definition only. It is meaningless on function prototype.
Signed-off-by: Stephen Hemminger <step...@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