diff mbox series

[-next] ehea: Fix a copy-paste err in ehea_init_port_res

Message ID 20190403074759.13496-1-yuehaibing@huawei.com
State Accepted
Delegated to: David Miller
Headers show
Series [-next] ehea: Fix a copy-paste err in ehea_init_port_res | expand

Commit Message

Yue Haibing April 3, 2019, 7:47 a.m. UTC
From: YueHaibing <yuehaibing@huawei.com>

pr->tx_bytes should be assigned to tx_bytes other than
rx_bytes.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: ce45b873028f ("ehea: Fixing statistics")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/ethernet/ibm/ehea/ehea_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mukesh Ojha April 4, 2019, 7:23 a.m. UTC | #1
On 4/3/2019 1:17 PM, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> pr->tx_bytes should be assigned to tx_bytes other than
> rx_bytes.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: ce45b873028f ("ehea: Fixing statistics")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

Cheers,
-Mukesh
> ---
>   drivers/net/ethernet/ibm/ehea/ehea_main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
> index 90b62c1..707c8ba 100644
> --- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
> +++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
> @@ -1463,7 +1463,7 @@ static int ehea_init_port_res(struct ehea_port *port, struct ehea_port_res *pr,
>   
>   	memset(pr, 0, sizeof(struct ehea_port_res));
>   
> -	pr->tx_bytes = rx_bytes;
> +	pr->tx_bytes = tx_bytes;
>   	pr->tx_packets = tx_packets;
>   	pr->rx_bytes = rx_bytes;
>   	pr->rx_packets = rx_packets;
David Miller April 5, 2019, 12:36 a.m. UTC | #2
From: Yue Haibing <yuehaibing@huawei.com>
Date: Wed, 3 Apr 2019 15:47:59 +0800

> From: YueHaibing <yuehaibing@huawei.com>
> 
> pr->tx_bytes should be assigned to tx_bytes other than
> rx_bytes.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: ce45b873028f ("ehea: Fixing statistics")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
index 90b62c1..707c8ba 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
@@ -1463,7 +1463,7 @@  static int ehea_init_port_res(struct ehea_port *port, struct ehea_port_res *pr,
 
 	memset(pr, 0, sizeof(struct ehea_port_res));
 
-	pr->tx_bytes = rx_bytes;
+	pr->tx_bytes = tx_bytes;
 	pr->tx_packets = tx_packets;
 	pr->rx_bytes = rx_bytes;
 	pr->rx_packets = rx_packets;