All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bimmy Pujari <bimmy.pujari@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next PATCH S55 07/14] i40e: don't check params until after checking for client instance
Date: Mon, 28 Nov 2016 16:06:04 -0800	[thread overview]
Message-ID: <1480377971-23412-8-git-send-email-bimmy.pujari@intel.com> (raw)
In-Reply-To: <1480377971-23412-1-git-send-email-bimmy.pujari@intel.com>

From: Jacob Keller <jacob.e.keller@intel.com>

We can avoid the minor bit of work by calling check params after we
check for the client instance, since we're about to return early in
cases where we do not have a client.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Change-ID: I56f8ea2ba48d4f571fa331c9ace50819a022fa1c
---
 drivers/net/ethernet/intel/i40e/i40e_client.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_client.c b/drivers/net/ethernet/intel/i40e/i40e_client.c
index 7ca048f..f6409f9 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_client.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_client.c
@@ -174,8 +174,6 @@ void i40e_notify_client_of_l2_param_changes(struct i40e_vsi *vsi)
 
 	if (!vsi)
 		return;
-	memset(&params, 0, sizeof(params));
-	i40e_client_get_params(vsi, &params);
 	mutex_lock(&i40e_client_instance_mutex);
 	list_for_each_entry(cdev, &i40e_client_instances, list) {
 		if (cdev->lan_info.pf == vsi->back) {
@@ -186,6 +184,8 @@ void i40e_notify_client_of_l2_param_changes(struct i40e_vsi *vsi)
 					"Cannot locate client instance l2_param_change routine\n");
 				continue;
 			}
+	memset(&params, 0, sizeof(params));
+	i40e_client_get_params(vsi, &params);
 			if (!test_bit(__I40E_CLIENT_INSTANCE_OPENED,
 				      &cdev->state)) {
 				dev_dbg(&vsi->back->pdev->dev, "Client is not open, abort l2 param change\n");
-- 
2.4.11


  parent reply	other threads:[~2016-11-29  0:06 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-29  0:05 [Intel-wired-lan] [next PATCH S55 00/14] i40e/i40evf updates Bimmy Pujari
2016-11-29  0:05 ` [Intel-wired-lan] [next PATCH S55 01/14] i40e: Disabling ntuple filters cleans Cloud Filters up Bimmy Pujari
2016-12-01 18:26   ` Bowers, AndrewX
2016-11-29  0:05 ` [Intel-wired-lan] [next PATCH S55 02/14] i40e: Quick refactor to start moving data off stack and into Tx buffer info Bimmy Pujari
2016-12-01 18:50   ` Bowers, AndrewX
2016-11-29  0:06 ` [Intel-wired-lan] [next PATCH S55 03/14] i40e: Remove FPK HyperV VF device ID Bimmy Pujari
2016-12-01 18:54   ` Bowers, AndrewX
2016-11-29  0:06 ` [Intel-wired-lan] [next PATCH S55 04/14] i40e: remove unused function Bimmy Pujari
2016-12-01 18:56   ` Bowers, AndrewX
2016-11-29  0:06 ` [Intel-wired-lan] [next PATCH S55 05/14] i40e: refactor macro INTRL_USEC_TO_REG Bimmy Pujari
2016-12-01 21:46   ` Bowers, AndrewX
2016-11-29  0:06 ` [Intel-wired-lan] [next PATCH S55 06/14] i40e: add interrupt rate limit verbosity Bimmy Pujari
2016-12-01 19:38   ` Bowers, AndrewX
2016-11-29  0:06 ` Bimmy Pujari [this message]
2016-12-01 19:39   ` [Intel-wired-lan] [next PATCH S55 07/14] i40e: don't check params until after checking for client instance Bowers, AndrewX
2016-11-29  0:06 ` [Intel-wired-lan] [next PATCH S55 08/14] i40evf: fix client warnings Bimmy Pujari
2016-12-01 19:46   ` Bowers, AndrewX
2016-11-29  0:06 ` [Intel-wired-lan] [next PATCH S55 09/14] i40evf: track outstanding client request Bimmy Pujari
2016-12-01 20:58   ` Bowers, AndrewX
2016-11-29  0:06 ` [Intel-wired-lan] [next PATCH S55 10/14] i40e/i40evf: Limit dma sync of RX buffers to actual packet size Bimmy Pujari
2016-12-01 21:50   ` Bowers, AndrewX
2016-11-29  0:06 ` [Intel-wired-lan] [next PATCH S55 11/14] i40e/i40evf: Moves skb from i40e_rx_buffer to i40e_ring Bimmy Pujari
2016-12-01 23:09   ` Bowers, AndrewX
2016-11-29  0:06 ` [Intel-wired-lan] [next PATCH S55 12/14] i40e/i40evf: elimitate i40e_pull_tail() Bimmy Pujari
2016-12-01 21:49   ` Bowers, AndrewX
2016-11-29  0:06 ` [Intel-wired-lan] [next PATCH S55 13/14] i40e: update comment explaining where FDIR buffers are freed Bimmy Pujari
2016-12-01 21:49   ` Bowers, AndrewX
2016-11-29  0:06 ` [Intel-wired-lan] [next PATCH S55 14/14] i40e/i40evf : Changed version from 1.6.25 to 1.6.27 Bimmy Pujari
2016-12-01 21:50   ` Bowers, AndrewX

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=1480377971-23412-8-git-send-email-bimmy.pujari@intel.com \
    --to=bimmy.pujari@intel.com \
    --cc=intel-wired-lan@osuosl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.