net/ixgbe: remove redundant assignment

Message ID 1567154729-7183-1-git-send-email-wang.yong19@zte.com.cn (mailing list archive)
State Accepted, archived
Delegated to: xiaolong ye
Headers
Series net/ixgbe: remove redundant assignment |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues
ci/iol-dpdk_compile success Compile Testing PASS
ci/iol-dpdk_compile_spdk success Compile Testing PASS
ci/iol-dpdk_compile_ovs success Compile Testing PASS
ci/intel-Performance success Performance Testing PASS
ci/mellanox-Performance success Performance Testing PASS

Commit Message

Yong Wang Aug. 30, 2019, 8:45 a.m. UTC
  Since "link.link_duplex" has been assigned to ETH_LINK_FULL_DUPLEX just
before switch statement, the assignment in switch-case statement is
redundant. Remove it.

Fixes: 82113036e4e5 ("ethdev: redesign link speed config")

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Xiaolong Ye Sept. 3, 2019, 1:58 p.m. UTC | #1
On 08/30, Yong Wang wrote:
>Since "link.link_duplex" has been assigned to ETH_LINK_FULL_DUPLEX just
>before switch statement, the assignment in switch-case statement is
>redundant. Remove it.
>
>Fixes: 82113036e4e5 ("ethdev: redesign link speed config")
>
>Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
>---
> drivers/net/ixgbe/ixgbe_ethdev.c | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
>index 03fc1f7..f328d7c 100644
>--- a/drivers/net/ixgbe/ixgbe_ethdev.c
>+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
>@@ -4138,7 +4138,6 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
> 			link.link_speed = ETH_SPEED_NUM_10M;
> 		else
> 			link.link_speed = ETH_SPEED_NUM_100M;
>-		link.link_duplex = ETH_LINK_FULL_DUPLEX;
> 		break;
> 
> 	case IXGBE_LINK_SPEED_100_FULL:
>-- 
>1.8.3.1
>

Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>

Applied to dpdk-next-net-intel with 'Cc: stable@dpdk.org' added in the commit log.
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 03fc1f7..f328d7c 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4138,7 +4138,6 @@  static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 			link.link_speed = ETH_SPEED_NUM_10M;
 		else
 			link.link_speed = ETH_SPEED_NUM_100M;
-		link.link_duplex = ETH_LINK_FULL_DUPLEX;
 		break;
 
 	case IXGBE_LINK_SPEED_100_FULL: