netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Shannon Nelson <shannon.nelson@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 07/18] i40e: make i40e_init_pf_fcoe to void
Date: Wed,  7 Oct 2015 15:47:01 -0700	[thread overview]
Message-ID: <1444258032-41476-8-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1444258032-41476-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Shannon Nelson <shannon.nelson@intel.com>

i40e_init_pf_fcoe() didn't return anything except 0, it prints enough
error info already, and no driver logic depends on the return value,
so this can be void.

Change-ID: Ie6afad849857d87a7064c42c3cce14c74c2f29d8
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e.h      |  2 +-
 drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 10 ++++------
 drivers/net/ethernet/intel/i40e/i40e_main.c |  8 ++------
 3 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index f6d97ad..44837ec 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -740,7 +740,7 @@ int i40e_fcoe_vsi_init(struct i40e_vsi *vsi, struct i40e_vsi_context *ctxt);
 u8 i40e_get_fcoe_tc_map(struct i40e_pf *pf);
 void i40e_fcoe_config_netdev(struct net_device *netdev, struct i40e_vsi *vsi);
 void i40e_fcoe_vsi_setup(struct i40e_pf *pf);
-int i40e_init_pf_fcoe(struct i40e_pf *pf);
+void i40e_init_pf_fcoe(struct i40e_pf *pf);
 int i40e_fcoe_setup_ddp_resources(struct i40e_vsi *vsi);
 void i40e_fcoe_free_ddp_resources(struct i40e_vsi *vsi);
 int i40e_fcoe_handle_offload(struct i40e_ring *rx_ring,
diff --git a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
index 5ea75dd..2398d9b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
@@ -272,10 +272,8 @@ out:
 /**
  * i40e_fcoe_sw_init - sets up the HW for FCoE
  * @pf: pointer to PF
- *
- * Returns 0 if FCoE is supported otherwise the error code
  **/
-int i40e_init_pf_fcoe(struct i40e_pf *pf)
+void i40e_init_pf_fcoe(struct i40e_pf *pf)
 {
 	struct i40e_hw *hw = &pf->hw;
 	u32 val;
@@ -287,13 +285,13 @@ int i40e_init_pf_fcoe(struct i40e_pf *pf)
 
 	if (!pf->hw.func_caps.fcoe) {
 		dev_info(&pf->pdev->dev, "FCoE capability is disabled\n");
-		return 0;
+		return;
 	}
 
 	if (!pf->hw.func_caps.dcb) {
 		dev_warn(&pf->pdev->dev,
 			 "Hardware is not DCB capable not enabling FCoE.\n");
-		return 0;
+		return;
 	}
 
 	/* enable FCoE hash filter */
@@ -326,7 +324,7 @@ int i40e_init_pf_fcoe(struct i40e_pf *pf)
 	wr32(hw, I40E_GLFCOE_RCTL, val);
 
 	dev_info(&pf->pdev->dev, "FCoE is supported.\n");
-	return 0;
+	return;
 }
 
 /**
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 19eb14d..0ef6a15 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -6573,9 +6573,7 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit)
 	}
 #endif /* CONFIG_I40E_DCB */
 #ifdef I40E_FCOE
-	ret = i40e_init_pf_fcoe(pf);
-	if (ret)
-		dev_info(&pf->pdev->dev, "init_pf_fcoe failed: %d\n", ret);
+	i40e_init_pf_fcoe(pf);
 
 #endif
 	/* do basic switch setup */
@@ -7976,9 +7974,7 @@ static int i40e_sw_init(struct i40e_pf *pf)
 	}
 
 #ifdef I40E_FCOE
-	err = i40e_init_pf_fcoe(pf);
-	if (err)
-		dev_info(&pf->pdev->dev, "init_pf_fcoe failed: %d\n", err);
+	i40e_init_pf_fcoe(pf);
 
 #endif /* I40E_FCOE */
 #ifdef CONFIG_PCI_IOV
-- 
2.4.3

  parent reply	other threads:[~2015-10-07 22:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-07 22:46 [net-next 00/18][pull request] Intel Wired LAN Driver Updates 2015-10-07 Jeff Kirsher
2015-10-07 22:46 ` [net-next 01/18] i40e: Increase the amount of time we wait for reset to be done Jeff Kirsher
2015-10-07 22:46 ` [net-next 02/18] i40e: enable WoL operation if config bit show WoL capable Jeff Kirsher
2015-10-07 22:46 ` [net-next 03/18] i40e: stop VF rings Jeff Kirsher
2015-10-07 22:46 ` [net-next 04/18] i40e/i40evf: add driver support for new device ids Jeff Kirsher
2015-10-07 22:46 ` [net-next 05/18] i40e/i40evf: fix a potential type compare issue Jeff Kirsher
2015-10-07 22:47 ` [net-next 06/18] i40e: fix bad CEE status shift value Jeff Kirsher
2015-10-07 22:47 ` Jeff Kirsher [this message]
2015-10-08 18:53   ` [net-next 07/18] i40e: make i40e_init_pf_fcoe to void Sergei Shtylyov
2015-10-07 22:47 ` [net-next 08/18] i40e/i40evf: assure clean asq status report Jeff Kirsher
2015-10-07 22:47 ` [net-next 09/18] i40e: Fix for truncated interrupt name Jeff Kirsher
2015-10-07 22:47 ` [net-next 10/18] i40e: Never let speed get set to 0 in get_settings Jeff Kirsher
2015-10-07 22:47 ` [net-next 11/18] i40e/i40evf: give up the __func__ Jeff Kirsher
2015-10-07 22:47 ` [net-next 12/18] i40e: add little endian conversion for checksum Jeff Kirsher
2015-10-07 22:47 ` [net-next 13/18] i40e: fix bug in return from get_link_status and avoid spurious link messages Jeff Kirsher
2015-10-07 22:47 ` [net-next 14/18] i40e/i40evf: fix unicast mac address add Jeff Kirsher
2015-10-07 22:47 ` [net-next 15/18] i40e/i40evf: Add a stat to keep track of linearization count Jeff Kirsher
2015-10-07 22:47 ` [net-next 16/18] i40e: Additional checks for CEE APP priority validity Jeff Kirsher
2015-10-07 22:47 ` [net-next 17/18] i40evf: propagate interrupt allocation failure Jeff Kirsher
2015-10-07 22:47 ` [net-next 18/18] i40e/i40evf: remove unused opcode Jeff Kirsher
2015-10-08 11:21 ` [net-next 00/18][pull request] Intel Wired LAN Driver Updates 2015-10-07 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=1444258032-41476-8-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=jogreene@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    --cc=shannon.nelson@intel.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;
as well as URLs for NNTP newsgroup(s).