From d8fe7cdcfc33a6374bf549c74d23325c1f90a5e0 Mon Sep 17 00:00:00 2001 From: Adrien Mazarguil Date: Fri, 1 Sep 2017 10:06:42 +0200 Subject: [PATCH] net/mlx4: simplify link update function Returning a different value when the current link status differs from the previous one was probably useful at some point in the past but is now meaningless; this value is ignored both internally (mlx4 PMD) and externally (ethdev wrapper). Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index 1208e7ac03..9694170d79 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -2476,13 +2476,8 @@ mlx4_link_update(struct rte_eth_dev *dev, int wait_to_complete) ETH_LINK_HALF_DUPLEX : ETH_LINK_FULL_DUPLEX); dev_link.link_autoneg = !(dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED); - if (memcmp(&dev_link, &dev->data->dev_link, sizeof(dev_link))) { - /* Link status changed. */ - dev->data->dev_link = dev_link; - return 0; - } - /* Link status is still the same. */ - return -1; + dev->data->dev_link = dev_link; + return 0; } /** -- 2.20.1