From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Mitch Williams <mitch.a.williams@intel.com>,
netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 12/15] i40e: make i40evf_map_rings_to_vectors void
Date: Mon, 2 Oct 2017 12:48:49 -0700 [thread overview]
Message-ID: <20171002194852.71970-13-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20171002194852.71970-1-jeffrey.t.kirsher@intel.com>
From: Mitch Williams <mitch.a.williams@intel.com>
This function cannot fail, so why is it returning a value? And why are
we checking it? Why shouldn't we just make it void? Why is this commit
message made up of only questions?
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40evf/i40evf_main.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 8c513ce84345..f2f1e754c2ce 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -430,12 +430,11 @@ i40evf_map_vector_to_txq(struct i40evf_adapter *adapter, int v_idx, int t_idx)
* group the rings as "efficiently" as possible. You would add new
* mapping configurations in here.
**/
-static int i40evf_map_rings_to_vectors(struct i40evf_adapter *adapter)
+static void i40evf_map_rings_to_vectors(struct i40evf_adapter *adapter)
{
int rings_remaining = adapter->num_active_queues;
int ridx = 0, vidx = 0;
int q_vectors;
- int err = 0;
q_vectors = adapter->num_msix_vectors - NONQ_VECS;
@@ -451,8 +450,6 @@ static int i40evf_map_rings_to_vectors(struct i40evf_adapter *adapter)
}
adapter->aq_required |= I40EVF_FLAG_AQ_MAP_VECTORS;
-
- return err;
}
#ifdef CONFIG_NET_POLL_CONTROLLER
@@ -1578,9 +1575,7 @@ static int i40evf_reinit_interrupt_scheme(struct i40evf_adapter *adapter)
set_bit(__I40E_VSI_DOWN, adapter->vsi.state);
- err = i40evf_map_rings_to_vectors(adapter);
- if (err)
- goto err;
+ i40evf_map_rings_to_vectors(adapter);
if (RSS_AQ(adapter))
adapter->aq_required |= I40EVF_FLAG_AQ_CONFIGURE_RSS;
--
2.14.2
next prev parent reply other threads:[~2017-10-02 19:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-02 19:48 [net-next 00/15][pull request] 40GbE Intel Wired LAN Driver Updates 2017-10-02 Jeff Kirsher
2017-10-02 19:48 ` [net-next 01/15] i40e: limit lan queue count in large CPU count machine Jeff Kirsher
2017-10-02 19:48 ` [net-next 02/15] i40e: remove logically dead code Jeff Kirsher
2017-10-02 19:48 ` [net-next 03/15] i40e: Fix a potential NULL pointer dereference Jeff Kirsher
2017-10-02 19:48 ` [net-next 04/15] i40e: Fix reporting of supported link modes Jeff Kirsher
2017-10-02 19:48 ` [net-next 05/15] i40e: Add support for 'ethtool -m' Jeff Kirsher
2017-10-02 19:48 ` [net-next 06/15] i40e: use admin queue for setting LEDs behavior Jeff Kirsher
2017-10-02 19:48 ` [net-next 07/15] i40e: don't hold spinlock while resetting VF Jeff Kirsher
2017-10-02 19:48 ` [net-next 08/15] i40e: drop i40e_pf *pf from i40e_vc_disable_vf() Jeff Kirsher
2017-10-02 19:48 ` [net-next 09/15] i40e: make use of i40e_vc_disable_vf Jeff Kirsher
2017-10-02 19:48 ` [net-next 10/15] i40e: ensure reset occurs when disabling VF Jeff Kirsher
2017-10-02 19:48 ` [net-next 11/15] i40evf: Enable VF to request an alternate queue allocation Jeff Kirsher
2017-10-02 20:50 ` Yuval Mintz
2017-10-02 21:35 ` Brady, Alan
2017-10-02 19:48 ` Jeff Kirsher [this message]
2017-10-02 19:48 ` [net-next 13/15] i40e: fix handling of vf_states variable Jeff Kirsher
2017-10-02 19:48 ` [net-next 14/15] i40e: fix client notify of VF reset Jeff Kirsher
2017-10-02 19:48 ` [net-next 15/15] i40e: Stop dropping 802.1ad tags - eth proto 0x88a8 Jeff Kirsher
2017-10-02 22:17 ` [net-next 00/15][pull request] 40GbE Intel Wired LAN Driver Updates 2017-10-02 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=20171002194852.71970-13-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=jogreene@redhat.com \
--cc=mitch.a.williams@intel.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@redhat.com \
--cc=sassmann@redhat.com \
/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