2019-04-03 07:50:39

by Yue Haibing

[permalink] [raw]
Subject: [PATCH -next] ehea: Fix a copy-paste err in ehea_init_port_res

From: YueHaibing <[email protected]>

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

Reported-by: Hulk Robot <[email protected]>
Fixes: ce45b873028f ("ehea: Fixing statistics")
Signed-off-by: YueHaibing <[email protected]>
---
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;
--
2.7.0



2019-04-04 07:25:12

by Mukesh Ojha

[permalink] [raw]
Subject: Re: [PATCH -next] ehea: Fix a copy-paste err in ehea_init_port_res


On 4/3/2019 1:17 PM, Yue Haibing wrote:
> From: YueHaibing <[email protected]>
>
> pr->tx_bytes should be assigned to tx_bytes other than
> rx_bytes.
>
> Reported-by: Hulk Robot <[email protected]>
> Fixes: ce45b873028f ("ehea: Fixing statistics")
> Signed-off-by: YueHaibing <[email protected]>
Reviewed-by: Mukesh Ojha <[email protected]>

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;

2019-04-05 00:43:46

by David Miller

[permalink] [raw]
Subject: Re: [PATCH -next] ehea: Fix a copy-paste err in ehea_init_port_res

From: Yue Haibing <[email protected]>
Date: Wed, 3 Apr 2019 15:47:59 +0800

> From: YueHaibing <[email protected]>
>
> pr->tx_bytes should be assigned to tx_bytes other than
> rx_bytes.
>
> Reported-by: Hulk Robot <[email protected]>
> Fixes: ce45b873028f ("ehea: Fixing statistics")
> Signed-off-by: YueHaibing <[email protected]>

Applied.