All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH 4/7] kni: remove useless return statements
Date: Mon,  9 Jan 2017 15:30:19 -0800	[thread overview]
Message-ID: <20170109233022.31154-5-stephen@networkplumber.org> (raw)
In-Reply-To: <20170109233022.31154-1-stephen@networkplumber.org>

A return statement at end of void function is unnecessary.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_82575.c   |  4 ----
 lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_i210.c    |  2 --
 lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_mac.c     |  4 ----
 lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c     |  1 -
 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c   |  3 +--
 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c      |  2 --
 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_vmdq.c      | 11 ++---------
 lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82598.c |  2 --
 8 files changed, 3 insertions(+), 26 deletions(-)

diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_82575.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_82575.c
index d558af20..d0f77b11 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_82575.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_82575.c
@@ -1384,8 +1384,6 @@ void e1000_shutdown_serdes_link_82575(struct e1000_hw *hw)
 		E1000_WRITE_FLUSH(hw);
 		msec_delay(1);
 	}
-
-	return;
 }
 
 /**
@@ -2034,8 +2032,6 @@ static void e1000_power_down_phy_copper_82575(struct e1000_hw *hw)
 	/* If the management interface is not enabled, then power down */
 	if (!(e1000_enable_mng_pass_thru(hw) || phy->ops.check_reset_block(hw)))
 		e1000_power_down_phy_copper(hw);
-
-	return;
 }
 
 /**
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_i210.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_i210.c
index 7e4c20a9..7b81fa65 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_i210.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_i210.c
@@ -798,8 +798,6 @@ void e1000_init_function_pointers_i210(struct e1000_hw *hw)
 {
 	e1000_init_function_pointers_82575(hw);
 	hw->nvm.ops.init_params = e1000_init_nvm_params_i210;
-
-	return;
 }
 
 /**
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_mac.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_mac.c
index 74319def..4e003dea 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_mac.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_mac.c
@@ -90,7 +90,6 @@ s32 e1000_null_ops_generic(struct e1000_hw E1000_UNUSEDARG *hw)
 void e1000_null_mac_generic(struct e1000_hw E1000_UNUSEDARG *hw)
 {
 	DEBUGFUNC("e1000_null_mac_generic");
-	return;
 }
 
 /**
@@ -122,7 +121,6 @@ void e1000_null_update_mc(struct e1000_hw E1000_UNUSEDARG *hw,
 			  u8 E1000_UNUSEDARG *h, u32 E1000_UNUSEDARG a)
 {
 	DEBUGFUNC("e1000_null_update_mc");
-	return;
 }
 
 /**
@@ -133,7 +131,6 @@ void e1000_null_write_vfta(struct e1000_hw E1000_UNUSEDARG *hw,
 			   u32 E1000_UNUSEDARG a, u32 E1000_UNUSEDARG b)
 {
 	DEBUGFUNC("e1000_null_write_vfta");
-	return;
 }
 
 /**
@@ -144,7 +141,6 @@ void e1000_null_rar_set(struct e1000_hw E1000_UNUSEDARG *hw,
 			u8 E1000_UNUSEDARG *h, u32 E1000_UNUSEDARG a)
 {
 	DEBUGFUNC("e1000_null_rar_set");
-	return;
 }
 
 /**
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
index d8a77c45..185c14e9 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c
@@ -115,7 +115,6 @@ s32 e1000_null_read_reg(struct e1000_hw E1000_UNUSEDARG *hw,
 void e1000_null_phy_generic(struct e1000_hw E1000_UNUSEDARG *hw)
 {
 	DEBUGFUNC("e1000_null_phy_generic");
-	return;
 }
 
 /**
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c
index d7a987d5..8a79f386 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c
@@ -2415,9 +2415,8 @@ static void igb_get_dmac(struct net_device *netdev,
 			    struct ethtool_value *edata)
 {
 	struct igb_adapter *adapter = netdev_priv(netdev);
-	edata->data = adapter->dmac;
 
-	return;
+	edata->data = adapter->dmac;
 }
 #endif
 
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
index f4dca5a3..1f77db2c 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
@@ -2492,8 +2492,6 @@ static void igb_set_fw_version(struct igb_adapter *adapter)
 		}
 		break;
 	}
-
-	return;
 }
 
 /**
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_vmdq.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_vmdq.c
index 205da562..f48aebb0 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_vmdq.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_vmdq.c
@@ -197,8 +197,6 @@ void igb_vmdq_set_rx_mode(struct net_device *dev)
 #endif
 	}
 	E1000_WRITE_REG(hw, E1000_VMOLR(hw_queue), vmolr);
-
-	return;
 }
 
 int igb_vmdq_set_mac(struct net_device *dev, void *p)
@@ -247,9 +245,8 @@ void igb_vmdq_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
 
 	igb_enable_vlan_tags(adapter);
 	E1000_WRITE_REG(hw, E1000_VMVIR(hw_queue), 0);
-
-	return;
 }
+
 void igb_vmdq_vlan_rx_add_vid(struct net_device *dev, unsigned short vid)
 {
 	struct igb_vmdq_adapter *vadapter = netdev_priv(dev);
@@ -272,9 +269,8 @@ void igb_vmdq_vlan_rx_add_vid(struct net_device *dev, unsigned short vid)
 	v_netdev->features |= adapter->netdev->features;
 	vlan_group_set_device(vadapter->vlgrp, vid, v_netdev);
 #endif
-
-	return;
 }
+
 void igb_vmdq_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
 {
 	struct igb_vmdq_adapter *vadapter = netdev_priv(dev);
@@ -285,9 +281,6 @@ void igb_vmdq_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
 	vlan_group_set_device(vadapter->vlgrp, vid, NULL);
 	/* remove vlan from VLVF table array */
 	igb_vlvf_set(adapter, vid, FALSE, hw_queue);
-
-
-	return;
 }
 
 static int igb_vmdq_get_settings(struct net_device *netdev,
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82598.c b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82598.c
index e17b7f18..33a9213f 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82598.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82598.c
@@ -1291,6 +1291,4 @@ static void ixgbe_set_rxpba_82598(struct ixgbe_hw *hw, int num_pb,
 	/* Setup Tx packet buffer sizes */
 	for (i = 0; i < IXGBE_MAX_PACKET_BUFFERS; i++)
 		IXGBE_WRITE_REG(hw, IXGBE_TXPBSIZE(i), IXGBE_TXPBSIZE_40KB);
-
-	return;
 }
-- 
2.11.0

  parent reply	other threads:[~2017-01-09 23:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-09 23:30 [PATCH v2 0/7] minor cleanup Stephen Hemminger
2017-01-09 23:30 ` [PATCH 1/7] bonding, malloc, bitmap: remove useless return Stephen Hemminger
2017-01-09 23:30 ` [PATCH 2/7] ethdev: reduce goto's in attach/detach Stephen Hemminger
2017-01-10  8:40   ` Thomas Monjalon
2017-02-01 17:26     ` Ferruh Yigit
2017-01-09 23:30 ` [PATCH 3/7] bnx2x: remove useless return's Stephen Hemminger
2017-01-09 23:30 ` Stephen Hemminger [this message]
2017-01-11 17:36   ` [PATCH 4/7] kni: remove useless return statements Ferruh Yigit
2017-01-09 23:30 ` [PATCH 5/7] i40e: remove useless return Stephen Hemminger
2017-01-09 23:30 ` [PATCH 6/7] ixgbe: " Stephen Hemminger
2017-02-01 16:40   ` Ananyev, Konstantin
2017-02-08 14:43     ` Dai, Wei
2017-01-09 23:30 ` [PATCH 7/7] igb: remove useless return's Stephen Hemminger

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=20170109233022.31154-5-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.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.