Since wait_to_complete is unused, don't pass it to helper functions.
Use the standard RTE macro to indicate this is an unused parameter.

Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
---
 drivers/net/mlx5/mlx5_ethdev.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index a3cef6891d03..388507f109f7 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -755,11 +755,9 @@ mlx5_dev_supported_ptypes_get(struct rte_eth_dev *dev)
  *
  * @param dev
  *   Pointer to Ethernet device structure.
- * @param wait_to_complete
- *   Wait for request completion (ignored).
  */
 static int
-mlx5_link_update_unlocked_gset(struct rte_eth_dev *dev, int wait_to_complete)
+mlx5_link_update_unlocked_gset(struct rte_eth_dev *dev)
 {
        struct priv *priv = mlx5_get_priv(dev);
        struct ethtool_cmd edata = {
@@ -771,7 +769,6 @@ mlx5_link_update_unlocked_gset(struct rte_eth_dev *dev, int 
wait_to_complete)
 
        /* priv_lock() is not taken to allow concurrent calls. */
 
-       (void)wait_to_complete;
        if (priv_ifreq(priv, SIOCGIFFLAGS, &ifr)) {
                WARN("ioctl(SIOCGIFFLAGS) failed: %s", strerror(errno));
                return -1;
@@ -821,11 +818,9 @@ mlx5_link_update_unlocked_gset(struct rte_eth_dev *dev, 
int wait_to_complete)
  *
  * @param dev
  *   Pointer to Ethernet device structure.
- * @param wait_to_complete
- *   Wait for request completion (ignored).
  */
 static int
-mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev, int wait_to_complete)
+mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev)
 {
        struct priv *priv = mlx5_get_priv(dev);
        struct ethtool_link_settings gcmd = { .cmd = ETHTOOL_GLINKSETTINGS };
@@ -833,7 +828,6 @@ mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev, int 
wait_to_complete)
        struct rte_eth_link dev_link;
        uint64_t sc;
 
-       (void)wait_to_complete;
        if (priv_ifreq(priv, SIOCGIFFLAGS, &ifr)) {
                WARN("ioctl(SIOCGIFFLAGS) failed: %s", strerror(errno));
                return -1;
@@ -921,7 +915,7 @@ mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev, int 
wait_to_complete)
  *   Wait for request completion (ignored).
  */
 int
-mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete)
+mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete __rte_unused)
 {
        struct utsname utsname;
        int ver[3];
@@ -930,8 +924,8 @@ mlx5_link_update(struct rte_eth_dev *dev, int 
wait_to_complete)
            sscanf(utsname.release, "%d.%d.%d",
                   &ver[0], &ver[1], &ver[2]) != 3 ||
            KERNEL_VERSION(ver[0], ver[1], ver[2]) < KERNEL_VERSION(4, 9, 0))
-               return mlx5_link_update_unlocked_gset(dev, wait_to_complete);
-       return mlx5_link_update_unlocked_gs(dev, wait_to_complete);
+               return mlx5_link_update_unlocked_gset(dev);
+       return mlx5_link_update_unlocked_gs(dev);
 }
 
 /**
-- 
2.15.1

Reply via email to