[v2,net] gve: Copy and paste bug in gve_get_stats()
diff mbox series

Message ID 20190820090739.GB1845@kadam
State Accepted
Delegated to: David Miller
Headers show
Series
  • [v2,net] gve: Copy and paste bug in gve_get_stats()
Related show

Commit Message

Dan Carpenter Aug. 20, 2019, 9:11 a.m. UTC
There is a copy and paste error so we have "rx" where "tx" was intended
in the priv->tx[] array.

Fixes: f5cedc84a30d ("gve: Add transmit and receive support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
v2: fix a typo in the subject: buy -> bug (Thanks Walter Harms)

 drivers/net/ethernet/google/gve/gve_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Catherine Sullivan Aug. 21, 2019, 5:20 p.m. UTC | #1
On Tue, Aug 20, 2019 at 2:11 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> There is a copy and paste error so we have "rx" where "tx" was intended
> in the priv->tx[] array.
>
> Fixes: f5cedc84a30d ("gve: Add transmit and receive support")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> v2: fix a typo in the subject: buy -> bug (Thanks Walter Harms)
>
>  drivers/net/ethernet/google/gve/gve_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
> index 497298752381..aca95f64bde8 100644
> --- a/drivers/net/ethernet/google/gve/gve_main.c
> +++ b/drivers/net/ethernet/google/gve/gve_main.c
> @@ -50,7 +50,7 @@ static void gve_get_stats(struct net_device *dev, struct rtnl_link_stats64 *s)
>                                   u64_stats_fetch_begin(&priv->tx[ring].statss);
>                                 s->tx_packets += priv->tx[ring].pkt_done;
>                                 s->tx_bytes += priv->tx[ring].bytes_done;
> -                       } while (u64_stats_fetch_retry(&priv->rx[ring].statss,
> +                       } while (u64_stats_fetch_retry(&priv->tx[ring].statss,
>                                                        start));
>                 }
>         }
> --
> 2.20.1

Thanks!

Reviewed-by: Catherine Sullivan <csully@google.com>
David Miller Aug. 22, 2019, 3:50 a.m. UTC | #2
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Tue, 20 Aug 2019 12:11:44 +0300

> There is a copy and paste error so we have "rx" where "tx" was intended
> in the priv->tx[] array.
> 
> Fixes: f5cedc84a30d ("gve: Add transmit and receive support")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> v2: fix a typo in the subject: buy -> bug (Thanks Walter Harms)

Applied, thanks.

Patch
diff mbox series

diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
index 497298752381..aca95f64bde8 100644
--- a/drivers/net/ethernet/google/gve/gve_main.c
+++ b/drivers/net/ethernet/google/gve/gve_main.c
@@ -50,7 +50,7 @@  static void gve_get_stats(struct net_device *dev, struct rtnl_link_stats64 *s)
 				  u64_stats_fetch_begin(&priv->tx[ring].statss);
 				s->tx_packets += priv->tx[ring].pkt_done;
 				s->tx_bytes += priv->tx[ring].bytes_done;
-			} while (u64_stats_fetch_retry(&priv->rx[ring].statss,
+			} while (u64_stats_fetch_retry(&priv->tx[ring].statss,
 						       start));
 		}
 	}