From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Gal Pressman <galp@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>
Subject: [net-next V2 12/15] net/mlx5e: Remove redundant check in get ethtool stats
Date: Mon, 26 Mar 2018 13:56:00 -0700 [thread overview]
Message-ID: <20180326205603.9450-13-saeedm@mellanox.com> (raw)
In-Reply-To: <20180326205603.9450-1-saeedm@mellanox.com>
From: Gal Pressman <galp@mellanox.com>
ethtool core code makes sure data isn't NULL before calling
get_ethtool_stats, testing it again in the driver is redundant.
Signed-off-by: Gal Pressman <galp@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index 62061fd23143..d415e67b557b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -203,9 +203,6 @@ void mlx5e_ethtool_get_ethtool_stats(struct mlx5e_priv *priv,
{
int i, idx = 0;
- if (!data)
- return;
-
mutex_lock(&priv->state_lock);
mlx5e_update_stats(priv);
mutex_unlock(&priv->state_lock);
--
2.14.3
next prev parent reply other threads:[~2018-03-26 20:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-26 20:55 [pull request][net-next V2 00/15] Mellanox, mlx5 misc updates 2018-03-22 Saeed Mahameed
2018-03-26 20:55 ` [net-next V2 01/15] net/mlx5e: Expose PFC stall prevention counters Saeed Mahameed
2018-03-26 20:55 ` [net-next V2 02/15] ethtool: Add support for configuring PFC stall prevention in ethtool Saeed Mahameed
2018-03-26 20:55 ` [net-next V2 03/15] net/mlx5e: PFC stall prevention support Saeed Mahameed
2018-03-26 20:55 ` [net-next V2 04/15] net/mlx5: Add support for QUERY_VNIC_ENV command Saeed Mahameed
2018-03-26 20:55 ` [net-next V2 05/15] net/mlx5e: Add vnic steering drop statistics Saeed Mahameed
2018-03-26 20:55 ` [net-next V2 06/15] net/mlx5: Add packet dropped while vport down statistics Saeed Mahameed
2018-03-26 20:55 ` [net-next V2 07/15] net/mlx5e: Add interface down dropped packets statistics Saeed Mahameed
2018-03-26 20:55 ` [net-next V2 08/15] net/mlx5: E-Switch, Use same source for offloaded actions check Saeed Mahameed
2018-03-26 20:55 ` [net-next V2 09/15] net/mlx5: Add core support for vlan push/pop steering action Saeed Mahameed
2018-03-26 20:55 ` [net-next V2 10/15] net/mlx5e: Offload tc vlan push/pop using HW action Saeed Mahameed
2018-03-26 20:55 ` [net-next V2 11/15] net/mlx5: Protect from command bit overflow Saeed Mahameed
2018-03-26 20:56 ` Saeed Mahameed [this message]
2018-03-26 20:56 ` [net-next V2 13/15] net/mlx5e: Make choose LRO timeout function static Saeed Mahameed
2018-03-26 20:56 ` [net-next V2 14/15] net/mlx5e: Add a helper macro in set features ndo Saeed Mahameed
2018-03-26 20:56 ` [net-next V2 15/15] net/mlx5e: Add VLAN offload features to hw_enc_features Saeed Mahameed
2018-03-27 15:05 ` [pull request][net-next V2 00/15] Mellanox, mlx5 misc updates 2018-03-22 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180326205603.9450-13-saeedm@mellanox.com \
--to=saeedm@mellanox.com \
--cc=davem@davemloft.net \
--cc=galp@mellanox.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox