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 2/5] net/zxdh: remove __rte_unused attribute
Date: Sat, 22 Feb 2025 18:42:21 -0800 [thread overview]
Message-ID: <20250223024334.1216477-3-stephen@networkplumber.org> (raw)
In-Reply-To: <20250223024334.1216477-1-stephen@networkplumber.org>
These are all function arguments that are used but incorrectly
labeled as unused.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/zxdh/zxdh_ethdev.c | 2 +-
drivers/net/zxdh/zxdh_ethdev_ops.c | 2 +-
drivers/net/zxdh/zxdh_msg.c | 20 ++++++++------------
drivers/net/zxdh/zxdh_mtr.c | 2 +-
4 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/drivers/net/zxdh/zxdh_ethdev.c b/drivers/net/zxdh/zxdh_ethdev.c
index cbda0615db..d444bc2484 100644
--- a/drivers/net/zxdh/zxdh_ethdev.c
+++ b/drivers/net/zxdh/zxdh_ethdev.c
@@ -1465,7 +1465,7 @@ zxdh_agent_comm(struct rte_eth_dev *eth_dev, struct zxdh_hw *hw)
}
static inline int
-zxdh_dtb_dump_res_init(struct zxdh_hw *hw __rte_unused, ZXDH_DEV_INIT_CTRL_T *dpp_ctrl)
+zxdh_dtb_dump_res_init(struct zxdh_hw *hw, ZXDH_DEV_INIT_CTRL_T *dpp_ctrl)
{
int ret = 0, i;
diff --git a/drivers/net/zxdh/zxdh_ethdev_ops.c b/drivers/net/zxdh/zxdh_ethdev_ops.c
index 12ad3f8d2c..2b02734c62 100644
--- a/drivers/net/zxdh/zxdh_ethdev_ops.c
+++ b/drivers/net/zxdh/zxdh_ethdev_ops.c
@@ -564,7 +564,7 @@ zxdh_dev_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
return 0;
}
-void zxdh_dev_mac_addr_remove(struct rte_eth_dev *dev __rte_unused, uint32_t index __rte_unused)
+void zxdh_dev_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
{
struct zxdh_hw *hw = dev->data->dev_private;
struct zxdh_msg_info msg_info = {0};
diff --git a/drivers/net/zxdh/zxdh_msg.c b/drivers/net/zxdh/zxdh_msg.c
index e5b5f53c64..5a47b4fde6 100644
--- a/drivers/net/zxdh/zxdh_msg.c
+++ b/drivers/net/zxdh/zxdh_msg.c
@@ -1245,8 +1245,7 @@ zxdh_vf_promisc_uninit(struct zxdh_hw *hw, union zxdh_virport_num vport)
static int
zxdh_vf_port_init(struct zxdh_hw *pf_hw, uint16_t vport, void *cfg_data,
- struct zxdh_msg_reply_body *res_info __rte_unused,
- uint16_t *res_len __rte_unused)
+ struct zxdh_msg_reply_body *res_info, uint16_t *res_len)
{
struct zxdh_port_attr_table port_attr = {0};
union zxdh_virport_num port = {.vport = vport};
@@ -1312,8 +1311,7 @@ zxdh_mac_clear(struct zxdh_hw *hw, union zxdh_virport_num vport)
static int
zxdh_vf_port_uninit(struct zxdh_hw *pf_hw,
uint16_t vport, void *cfg_data __rte_unused,
- struct zxdh_msg_reply_body *res_info __rte_unused,
- uint16_t *res_len __rte_unused)
+ struct zxdh_msg_reply_body *res_info, uint16_t *res_len)
{
char str[ZXDH_MSG_REPLY_BODY_MAX_LEN] = "uninit";
struct zxdh_port_attr_table port_attr = {0};
@@ -1674,7 +1672,7 @@ zxdh_vf_rss_table_get(struct zxdh_hw *hw, uint16_t vport, void *cfg_data __rte_u
static int
zxdh_vf_port_attr_set(struct zxdh_hw *pf_hw, uint16_t vport, void *cfg_data,
- struct zxdh_msg_reply_body *res_info __rte_unused, uint16_t *res_len __rte_unused)
+ struct zxdh_msg_reply_body *res_info, uint16_t *res_len)
{
RTE_ASSERT(!cfg_data || !pf_hw);
if (res_info)
@@ -1735,10 +1733,8 @@ zxdh_vf_port_attr_set(struct zxdh_hw *pf_hw, uint16_t vport, void *cfg_data,
}
static int
-zxdh_vf_np_stats_update(struct zxdh_hw *pf_hw, uint16_t vport,
- void *cfg_data __rte_unused,
- struct zxdh_msg_reply_body *res_info __rte_unused,
- uint16_t *res_len __rte_unused)
+zxdh_vf_np_stats_update(struct zxdh_hw *pf_hw, uint16_t vport, void *cfg_data,
+ struct zxdh_msg_reply_body *res_info, uint16_t *res_len)
{
struct zxdh_np_stats_updata_msg *np_stats_query =
(struct zxdh_np_stats_updata_msg *)cfg_data;
@@ -1876,7 +1872,7 @@ zxdh_vf_np_stats_update(struct zxdh_hw *pf_hw, uint16_t vport,
}
static int
-zxdh_vf_mtr_hw_stats_get(struct zxdh_hw *pf_hw __rte_unused,
+zxdh_vf_mtr_hw_stats_get(struct zxdh_hw *pf_hw,
uint16_t vport, void *cfg_data,
struct zxdh_msg_reply_body *res_info,
uint16_t *res_len)
@@ -1908,7 +1904,7 @@ zxdh_vf_mtr_hw_stats_get(struct zxdh_hw *pf_hw __rte_unused,
}
static int
-zxdh_vf_mtr_hw_profile_add(struct zxdh_hw *pf_hw __rte_unused,
+zxdh_vf_mtr_hw_profile_add(struct zxdh_hw *pf_hw,
uint16_t vport,
void *cfg_data,
struct zxdh_msg_reply_body *res_info,
@@ -2111,7 +2107,7 @@ zxdh_config_process_callback(struct zxdh_hw *hw, struct zxdh_msg_info *msg_info,
static int
pf_recv_bar_msg(void *pay_load, uint16_t len, void *reps_buffer,
- uint16_t *reps_len, void *eth_dev __rte_unused)
+ uint16_t *reps_len, void *eth_dev)
{
struct zxdh_msg_info *msg_info = (struct zxdh_msg_info *)pay_load;
struct zxdh_msg_reply_body *reply_body = reps_buffer;
diff --git a/drivers/net/zxdh/zxdh_mtr.c b/drivers/net/zxdh/zxdh_mtr.c
index c36170b23f..2df5f1cd88 100644
--- a/drivers/net/zxdh/zxdh_mtr.c
+++ b/drivers/net/zxdh/zxdh_mtr.c
@@ -1192,7 +1192,7 @@ zxdh_meter_ops_get(struct rte_eth_dev *dev __rte_unused, void *arg)
}
void
-zxdh_mtr_release(struct rte_eth_dev *dev __rte_unused)
+zxdh_mtr_release(struct rte_eth_dev *dev)
{
struct zxdh_hw *priv = dev->data->dev_private;
struct zxdh_meter_profile *profile;
--
2.47.2
next prev parent reply other threads:[~2025-02-23 2:44 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 ` [RFC 1/5] net/zxdh: remove __rte_unused from function prototypes Stephen Hemminger
2025-02-23 2:42 ` Stephen Hemminger [this message]
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-3-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).