minor cleanup
Subsystems (2)
v2 cover minor cleanup
Mostly things found while inspecting other code.
Stephen Hemminger (7):
bonding,malloc,bitmap: remove useless return
ethdev: reduce goto's in attach/detach
bnx2x: remove useless return's
kni: remove useless return statements
i40e: remove useless return
ixgbe: remove useless return
igb: remove useless return's
drivers/net/bnx2x/bnx2x.c | 2 - drivers/net/bnx2x/bnx2x_ethdev.c | 2 - drivers/net/bnx2x/elink.c | 1 - drivers/net/bonding/rte_eth_bond_pmd.c | 2 +- drivers/net/e1000/igb_pf.c | 2 - drivers/net/i40e/i40e_ethdev_vf.c | 3 -- drivers/net/ixgbe/ixgbe_82599_bypass.c | 10 ++--- lib/librte_eal/common/rte_malloc.c | 1 - .../linuxapp/kni/ethtool/igb/e1000_82575.c | 4 -- .../linuxapp/kni/ethtool/igb/e1000_i210.c | 2 - .../linuxapp/kni/ethtool/igb/e1000_mac.c | 4 -- .../linuxapp/kni/ethtool/igb/e1000_phy.c | 1 - .../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 +---- .../linuxapp/kni/ethtool/ixgbe/ixgbe_82598.c | 2 - lib/librte_ether/rte_ethdev.c | 52 +++++++++------------- lib/librte_sched/rte_bitmap.h | 2 - 18 files changed, 29 insertions(+), 77 deletions(-)
Signature · 1 line
2.11.0
PATCH v2 1/7 bonding, malloc, bitmap: remove useless return
return statements at end of void functions are unnecessary and unwanted.
--- drivers/net/bonding/rte_eth_bond_pmd.c | 2 +- lib/librte_eal/common/rte_malloc.c | 1 - lib/librte_sched/rte_bitmap.h | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-)
drivers/net/bonding/rte_eth_bond_pmd.c +1 -1
@@ -241,8 +241,8 @@ arp_op_name(uint16_t arp_op, char *buf)default : break; } +snprintf (buf,sizeof ("Unknown" ),"%s" ,"Unknown" ); -return ; }#endif #define MaxIPv4String 16
lib/librte_eal/common/rte_malloc.c +0 -1
@@ -232,7 +232,6 @@ rte_malloc_dump_stats(FILE *f, __rte_unused const char *type)fprintf (f,"\tAlloc_count:%u,\n" ,sock_stats.alloc_count);fprintf (f,"\tFree_count:%u,\n" , sock_stats.free_count); } -return ; }/*
lib/librte_sched/rte_bitmap.h +0 -2
@@ -453,8 +453,6 @@ rte_bitmap_clear(struct rte_bitmap *bmp, uint32_t pos) offset1 = (pos >>RTE_BITMAP_CL_BIT_SIZE_LOG2 ) &RTE_BITMAP_SLAB_BIT_MASK ; slab1 = bmp->array1 + index1; *slab1 &= ~(1lu << offset1); - -return ; } static inline int
Signature · 1 line
2.11.0
PATCH v2 2/7 ethdev: reduce goto's in attach/detach
In reply to Stephen HemmingerExtra goto's to just a return are unnecessary. Don't do unnecessary initialization. Propgate return value.
--- lib/librte_ether/rte_ethdev.c | 52 +++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 31 deletions(-)
lib/librte_ether/rte_ethdev.c +21 -31
@@ -419,18 +419,17 @@ rte_eth_dev_is_detachable(uint8_t port_id)int rte_eth_dev_attach (const char *devargs,uint8_t *port_id) { -int ret =-1 ;int current =rte_eth_dev_count ();char *name =NULL ;char *args =NULL ; +int ret; -if ((devargs ==NULL ) || (port_id ==NULL )) { - ret = -EINVAL ; - goto err; - } +if (devargs ==NULL || port_id ==NULL ) +return -EINVAL ;/* parse devargs, then retrieve device name and args */ -if (rte_eal_parse_devargs_str (devargs, &name, &args)) + ret =rte_eal_parse_devargs_str (devargs, &name, &args); +if (ret <0 ) goto err; ret =rte_eal_dev_attach (name, args);
@@ -441,20 +440,18 @@ rte_eth_dev_attach(const char *devargs, uint8_t *port_id)if (!rte_eth_dev_count ()) {RTE_LOG (ERR ,EAL ,"No port found for device (%s)\n" , name); ret =-1 ; - goto err; - } - -/* if nothing happened, there is a bug here, since some driver told us -* it did attach a device, but did not create a port. -*/ -if (current ==rte_eth_dev_count ()) { + }else if (current ==rte_eth_dev_count ()) { +/* +* if nothing happened, there is a bug here, since +* some driver told us it did attach a device, but did +* not create a port. +*/ ret =-1 ; - goto err; + }else { + *port_id = eth_dev_last_created_port; + ret =0 ; } - *port_id = eth_dev_last_created_port; - ret =0 ; - err:free (name);free (args);
@@ -465,27 +462,20 @@ rte_eth_dev_attach(const char *devargs, uint8_t *port_id)int rte_eth_dev_detach (uint8_t port_id,char *name) { -int ret =-1 ; +int ret; -if (name ==NULL ) { - ret = -EINVAL ; - goto err; - } +if (name ==NULL ) +return -EINVAL ;/* FIXME: move this to eal, once device flags are relocated there */ -if (rte_eth_dev_is_detachable (port_id)) - goto err; + ret =rte_eth_dev_is_detachable (port_id); +if (ret <0 ) +return ret;snprintf (name,sizeof (rte_eth_devices[port_id].data->name),"%s" , rte_eth_devices[port_id].data->name); - ret =rte_eal_dev_detach (name); -if (ret <0 ) - goto err; -return 0 ; - -err: -return ret; +return rte_eal_dev_detach (name); } static int
Signature · 1 line
2.11.0
Re: [PATCH 2/7] ethdev: reduce goto's in attach/detach
Hi Stephen,
Please use --in-reply-to to keep v1 and v2 in the same thread.
Comment below
2017-01-09 15:30, Stephen Hemminger:
Quoted 9 lines
int
rte_eth_dev_detach(uint8_t port_id, char *name)
{lib/librte_ether/rte_ethdev.c +1
-4-int ret =-1 ; +int ret; -if (name ==NULL ) { - ret = -EINVAL ; - goto err;
lib/librte_ether/rte_ethdev.c rte_eth_dev_attach(const char *devargs, uint8_t *port_id) · line 473
Quoted 10 lines
lib/librte_ether/rte_ethdev.c +5
-3- } +if (name ==NULL ) +return -EINVAL ;/* FIXME: move this to eal, once device flags are relocated there */ -if (rte_eth_dev_is_detachable (port_id)) - goto err; + ret =rte_eth_dev_is_detachable (port_id); +if (ret <0 ) +return ret;
As commented on v1 by Ferruh and I, you should check also positive value.
Quoted 13 lines
lib/librte_ether/rte_ethdev.c +1
-7snprintf (name,sizeof (rte_eth_devices[port_id].data->name),"%s" , rte_eth_devices[port_id].data->name); - ret =rte_eal_dev_detach (name); -if (ret <0 ) - goto err; -return 0 ; - -err: -return ret; +return rte_eal_dev_detach (name); }
Re: [PATCH 2/7] ethdev: reduce goto's in attach/detach
Quoted 21 lines · Thomas Monjalon
Hi Stephen,
Please use --in-reply-to to keep v1 and v2 in the same thread.
Comment below
2017-01-09 15:30, Stephen Hemminger:
Quoted 13 lines
int
rte_eth_dev_detach(uint8_t port_id, char *name)
{lib/librte_ether/rte_ethdev.c +3
-5-int ret =-1 ; +int ret; -if (name ==NULL ) { - ret = -EINVAL ; - goto err; - } +if (name ==NULL ) +return -EINVAL ;
Quoted 8 lines
lib/librte_ether/rte_ethdev.c rte_eth_dev_attach(const char *devargs, uint8_t *port_id) · line 473
Quoted 6 lines
lib/librte_ether/rte_ethdev.c +3
-2/* FIXME: move this to eal, once device flags are relocated there */ -if (rte_eth_dev_is_detachable (port_id)) - goto err; + ret =rte_eth_dev_is_detachable (port_id); +if (ret <0 ) +return ret;As commented on v1 by Ferruh and I, you should check also positive value.
In case it is not obvious, this patchset is stuck because of above change request not addressed.
Quoted 15 lines
Quoted 14 lines
lib/librte_ether/rte_ethdev.c +1
-7snprintf (name,sizeof (rte_eth_devices[port_id].data->name),"%s" , rte_eth_devices[port_id].data->name); - ret =rte_eal_dev_detach (name); -if (ret <0 ) - goto err; -return 0 ; - -err: -return ret; +return rte_eal_dev_detach (name); }
PATCH v2 3/7 bnx2x: remove useless return's
In reply to Stephen HemmingerDon't need empty return; at end of void function.
--- drivers/net/bnx2x/bnx2x.c | 2 -- drivers/net/bnx2x/bnx2x_ethdev.c | 2 -- drivers/net/bnx2x/elink.c | 1 - 3 files changed, 5 deletions(-)
drivers/net/bnx2x/bnx2x.c +0 -2
@@ -1371,8 +1371,6 @@ static void bnx2x_drain_tx_queues(struct bnx2x_softc *sc)rmb (); } } - -return ; } static int
drivers/net/bnx2x/bnx2x_ethdev.c +0 -2
@@ -225,8 +225,6 @@ bnx2x_dev_stop(struct rte_eth_dev *dev)PMD_DRV_LOG (DEBUG ,"bnx2x_nic_unload failed (%d)" , ret);return ; } - -return ; } static void
drivers/net/bnx2x/elink.c +0 -1
@@ -10362,7 +10362,6 @@ static void elink_5461x_set_link_led(struct elink_phy *phy,elink_cl22_write (sc, phy,MDIO_REG_GPHY_SHADOW ,MDIO_REG_GPHY_SHADOW_WR_ENA | temp); -return ; } static void elink_54618se_link_reset(struct elink_phy *phy,
Signature · 1 line
2.11.0
PATCH v2 4/7 kni: remove useless return statements
In reply to Stephen HemmingerA return statement at end of void function is unnecessary.
--- 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(-)
lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_82575.c +0 -4
@@ -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 ; }/**
lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_i210.c +0 -2
@@ -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 ; }/**
lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_mac.c +0 -4
@@ -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 ; }/**
lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c +0 -1
@@ -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 ; }/**
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_ethtool.c +1 -2
@@ -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
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c +0 -2
@@ -2492,8 +2492,6 @@ static void igb_set_fw_version(struct igb_adapter *adapter) }break ; } - -return ; }/**
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_vmdq.c +2 -9
@@ -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,
lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82598.c +0 -2
@@ -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 ; }
Signature · 1 line
2.11.0
Re: [PATCH 4/7] kni: remove useless return statements
Quoted 14 lines · Stephen Hemminger
A return statement at end of void function is unnecessary.
Signed-off-by Stephen Hemminger <[email protected]>--- 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:
PATCH v2 5/7 i40e: remove useless return
In reply to Stephen HemmingerNo need for return at end of void function.
--- drivers/net/i40e/i40e_ethdev_vf.c | 3 --- 1 file changed, 3 deletions(-)
drivers/net/i40e/i40e_ethdev_vf.c +0 -3
@@ -882,8 +882,6 @@ i40evf_add_mac_addr(struct rte_eth_dev *dev,if (err)PMD_DRV_LOG (ERR ,"fail to execute command " "OP_ADD_ETHER_ADDRESS" ); - -return ; } static void
@@ -923,7 +921,6 @@ i40evf_del_mac_addr(struct rte_eth_dev *dev, uint32_t index)if (err)PMD_DRV_LOG (ERR ,"fail to execute command " "OP_DEL_ETHER_ADDRESS" ); -return ; } static int
Signature · 1 line
2.11.0
PATCH v2 6/7 ixgbe: remove useless return
In reply to Stephen HemmingerIf all goto's lead to a return, then better to get rid of goto.
--- drivers/net/ixgbe/ixgbe_82599_bypass.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/net/ixgbe/ixgbe_82599_bypass.c +4 -6
@@ -73,7 +73,7 @@ ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed) &eeprom_data);if (status) {PMD_DRV_LOG (ERR ,"Failed to read Rx Rate Select RS0" ); - goto out; +return ; } eeprom_data = (eeprom_data & ~IXGBE_SFF_SOFT_RS_SELECT_MASK ) & rs;
@@ -83,7 +83,7 @@ ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed) eeprom_data);if (status) {PMD_DRV_LOG (ERR ,"Failed to write Rx Rate Select RS0" ); - goto out; +return ; }/* Set RS1 */
@@ -92,7 +92,7 @@ ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed) &eeprom_data);if (status) {PMD_DRV_LOG (ERR ,"Failed to read Rx Rate Select RS1" ); - goto out; +return ; } eeprom_data = (eeprom_data & ~IXGBE_SFF_SOFT_RS_SELECT_MASK ) & rs;
@@ -102,10 +102,8 @@ ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed) eeprom_data);if (status) {PMD_DRV_LOG (ERR ,"Failed to write Rx Rate Select RS1" ); - goto out; +return ; } -out: -return ; }/**
Signature · 1 line
2.11.0
Re: [PATCH 6/7] ixgbe: remove useless return
Quoted 50 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Stephen Hemminger
Sent: Monday, January 9, 2017 11:30 PM
To: [email protected]
Cc: Stephen Hemminger <[email protected]>
Subject: [dpdk-dev] [PATCH 6/7] ixgbe: remove useless returnIf all goto's lead to a return, then better to get rid of goto.
Signed-off-by Stephen Hemminger <[email protected]>--- drivers/net/ixgbe/ixgbe_82599_bypass.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/net/ixgbe/ixgbe_82599_bypass.c +3
-3@@ -73,7 +73,7 @@ ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed) &eeprom_data);if (status) {PMD_DRV_LOG (ERR ,"Failed to read Rx Rate Select RS0" ); - goto out; +return ; } eeprom_data = (eeprom_data & ~IXGBE_SFF_SOFT_RS_SELECT_MASK ) & rs;@@ -83,7 +83,7 @@ ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed) eeprom_data);if (status) {PMD_DRV_LOG (ERR ,"Failed to write Rx Rate Select RS0" ); - goto out; +return ; }/* Set RS1 */ @@ -92,7 +92,7 @@ ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed) &eeprom_data);if (status) {PMD_DRV_LOG (ERR ,"Failed to read Rx Rate Select RS1" ); - goto out; +return ; } eeprom_data = (eeprom_data & ~IXGBE_SFF_SOFT_RS_SELECT_MASK ) & rs;@@ -102,10 +102,8 @@ ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed) eeprom_data);if (status) {
drivers/net/ixgbe/ixgbe_82599_bypass.c ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed)
Quoted 10 lines
drivers/net/ixgbe/ixgbe_82599_bypass.c +1
-4PMD_DRV_LOG (ERR ,"Failed to write Rx Rate Select RS1" ); - goto out; +return ; } -out: -return ; }/** --
Quoted 1 line
2.11.0
Dai, Wei
Acked-byRe: [PATCH 6/7] ixgbe: remove useless return
Quoted 5 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Ananyev, Konstantin
Sent: Thursday, February 2, 2017 12:41 AM
To: Stephen Hemminger <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH 6/7] ixgbe: remove useless return
Subject line had better be net/ixgbe: remove useless return
Quoted 54 lines
drivers/net/ixgbe/ixgbe_82599_bypass.c ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw,
Quoted 23 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Stephen Hemminger
Sent: Monday, January 9, 2017 11:30 PM
To: [email protected]
Cc: Stephen Hemminger <[email protected]>
Subject: [dpdk-dev] [PATCH 6/7] ixgbe: remove useless returnIf all goto's lead to a return, then better to get rid of goto.
Signed-off-by Stephen Hemminger <[email protected]>--- drivers/net/ixgbe/ixgbe_82599_bypass.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/net/ixgbe/ixgbe_82599_bypass.c +0
-0@@ -73,7 +73,7 @@ ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw,
ixgbe_link_speedspeed)drivers/net/ixgbe/ixgbe_82599_bypass.c ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed)
Quoted 8 lines
drivers/net/ixgbe/ixgbe_82599_bypass.c +1
-1&eeprom_data);if (status) {PMD_DRV_LOG (ERR ,"Failed to read Rx Rate Select RS0" ); - goto out; +return ; } eeprom_data = (eeprom_data & ~IXGBE_SFF_SOFT_RS_SELECT_MASK) &rs;
drivers/net/ixgbe/ixgbe_82599_bypass.c ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw,
Quoted 1 line
drivers/net/ixgbe/ixgbe_82599_bypass.c +0
-0@@ -83,7 +83,7 @@ ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw,
ixgbe_link_speedspeed)drivers/net/ixgbe/ixgbe_82599_bypass.c ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw,
Quoted 9 lines
drivers/net/ixgbe/ixgbe_82599_bypass.c +1
-1eeprom_data);if (status) {PMD_DRV_LOG (ERR ,"Failed to write Rx Rate Select RS0" ); - goto out; +return ; }/* Set RS1 */ @@ -92,7 +92,7 @@ ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw,
ixgbe_link_speedspeed)drivers/net/ixgbe/ixgbe_82599_bypass.c ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed)
Quoted 8 lines
drivers/net/ixgbe/ixgbe_82599_bypass.c +1
-1&eeprom_data);if (status) {PMD_DRV_LOG (ERR ,"Failed to read Rx Rate Select RS1" ); - goto out; +return ; } eeprom_data = (eeprom_data & ~IXGBE_SFF_SOFT_RS_SELECT_MASK) &rs;
Quoted 7 lines
drivers/net/ixgbe/ixgbe_82599_bypass.c ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw,
Quoted 1 line
drivers/net/ixgbe/ixgbe_82599_bypass.c +0
-0@@ -102,10 +102,8 @@ ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw,
ixgbe_link_speedspeed)drivers/net/ixgbe/ixgbe_82599_bypass.c ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed) · line 105
Quoted 5 lines
drivers/net/ixgbe/ixgbe_82599_bypass.c +1
-1eeprom_data);if (status) {PMD_DRV_LOG (ERR ,"Failed to write Rx Rate Select RS1" ); - goto out; +return ;
This return is also not needed. :-)
Quoted 9 lines
drivers/net/ixgbe/ixgbe_82599_bypass.c ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed)
Quoted 7 lines
drivers/net/ixgbe/ixgbe_82599_bypass.c +0
-3} -out: -return ; }/** --
Quoted 2 lines
Quoted 2 lines
2.11.0
PATCH v2 7/7 igb: remove useless return's
In reply to Stephen Hemminger--- drivers/net/e1000/igb_pf.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/e1000/igb_pf.c +0 -2
@@ -125,8 +125,6 @@ void igb_pf_host_init(struct rte_eth_dev *eth_dev)/* set mb interrupt mask */ igb_mb_intr_setup (eth_dev); - -return ; }void igb_pf_host_uninit (struct rte_eth_dev *dev)
Signature · 1 line
2.11.0