On 1/9/2017 11:30 PM, Stephen Hemminger wrote:
> 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(-)
>
I am not sure about benefit of refactoring drivers in KNI, since we have
no intention to do development on that code, at best we can get updated
version of the driver and replace, which I don't expect to happen soon.
But if you have strong opinion on this:
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -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;
}
/**
@@ -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;
}
/**
@@ -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;
}
/**
@@ -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;
}
/**
@@ -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
@@ -2492,8 +2492,6 @@ static void igb_set_fw_version(struct igb_adapter *adapter)
}
break;
}
-
- return;
}
/**
@@ -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,
@@ -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;
}