mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
Merge branch 'net-remove-conditional-returns-with-no-effect'
Sang-Heon Jeon says: ==================== net: remove conditional returns with no effect This series removes conditional returns where both branches return the same value, so the check has no effect. As suggested by Jakub, the netdev patches of the treewide v1 series [1] are posted separately. All patches are generated by the Coccinelle script, which you can find in v1. The patch grouping is unchanged from v1. If you would rather split, merge or drop any of the patches, just let me know and I will address it in the next version. [1] https://lore.kernel.org/all/20260723184538.3888637-1-ekffu200098@gmail.com/ --- Sang-Heon Jeon (4): dpll: zl3073x: remove conditional return with no effect net: ethernet: remove conditional return with no effect net: remove conditional return with no effect net: intel: remove conditional return with no effect drivers/dpll/zl3073x/dpll.c | 6 +----- drivers/dpll/zl3073x/out.c | 8 ++------ drivers/net/ethernet/amazon/ena/ena_netdev.c | 6 +----- drivers/net/ethernet/aquantia/atlantic/aq_macsec.c | 6 +----- drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c | 6 +----- drivers/net/ethernet/freescale/gianfar.c | 6 +----- drivers/net/ethernet/intel/i40e/i40e_main.c | 8 +------- drivers/net/ethernet/intel/igb/e1000_i210.c | 6 +----- drivers/net/ethernet/intel/igc/igc_phy.c | 6 +----- drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c | 7 +------ drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 6 +----- drivers/net/ethernet/renesas/rtsn.c | 7 +------ drivers/net/phy/microchip_t1.c | 6 +----- drivers/net/pse-pd/tps23881.c | 6 +----- 14 files changed, 15 insertions(+), 75 deletions(-) ==================== Link: https://patch.msgid.link/20260725150852.859188-1-ekffu200098@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
commit
7d34154b64
|
|
@ -2272,11 +2272,7 @@ zl3073x_dpll_init_fine_phase_adjust(struct zl3073x_dev *zldev)
|
|||
if (rc)
|
||||
return rc;
|
||||
|
||||
rc = zl3073x_write_u8(zldev, ZL_REG_SYNTH_PHASE_SHIFT_CTRL, 0x01);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
return rc;
|
||||
return zl3073x_write_u8(zldev, ZL_REG_SYNTH_PHASE_SHIFT_CTRL, 0x01);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -85,12 +85,8 @@ int zl3073x_out_state_fetch(struct zl3073x_dev *zldev, u8 index)
|
|||
if (rc)
|
||||
return rc;
|
||||
|
||||
rc = zl3073x_read_u32(zldev, ZL_REG_OUTPUT_PHASE_COMP,
|
||||
&out->phase_comp);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
return rc;
|
||||
return zl3073x_read_u32(zldev, ZL_REG_OUTPUT_PHASE_COMP,
|
||||
&out->phase_comp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2303,11 +2303,7 @@ static int ena_open(struct net_device *netdev)
|
|||
return rc;
|
||||
}
|
||||
|
||||
rc = ena_up(adapter);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
return rc;
|
||||
return ena_up(adapter);
|
||||
}
|
||||
|
||||
/* ena_close - Disables a network interface
|
||||
|
|
|
|||
|
|
@ -735,11 +735,7 @@ static int aq_set_rxsc(struct aq_nic_s *nic, const u32 rxsc_idx)
|
|||
sc_record.valid = 1;
|
||||
sc_record.fresh = 1;
|
||||
|
||||
ret = aq_mss_set_ingress_sc_record(hw, &sc_record, hw_sc_idx);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return ret;
|
||||
return aq_mss_set_ingress_sc_record(hw, &sc_record, hw_sc_idx);
|
||||
}
|
||||
|
||||
static int aq_mdo_add_rxsc(struct macsec_context *ctx)
|
||||
|
|
|
|||
|
|
@ -3935,11 +3935,7 @@ static int dpaa2_switch_port_init(struct ethsw_port_priv *port_priv, u16 port)
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
err = dpaa2_switch_port_trap_mac_addr(port_priv, ll_mac, ll_mask);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
return err;
|
||||
return dpaa2_switch_port_trap_mac_addr(port_priv, ll_mac, ll_mask);
|
||||
}
|
||||
|
||||
static void dpaa2_switch_ctrl_if_teardown(struct ethsw_core *ethsw)
|
||||
|
|
|
|||
|
|
@ -2877,11 +2877,7 @@ static int gfar_enet_open(struct net_device *dev)
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
err = startup_gfar(dev);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
return err;
|
||||
return startup_gfar(dev);
|
||||
}
|
||||
|
||||
/* Stops the kernel queue, and halts the controller */
|
||||
|
|
|
|||
|
|
@ -4864,16 +4864,10 @@ static void i40e_control_rx_q(struct i40e_pf *pf, int pf_q, bool enable)
|
|||
**/
|
||||
int i40e_control_wait_rx_q(struct i40e_pf *pf, int pf_q, bool enable)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
i40e_control_rx_q(pf, pf_q, enable);
|
||||
|
||||
/* wait for the change to finish */
|
||||
ret = i40e_pf_rxq_wait(pf, pf_q, enable);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return ret;
|
||||
return i40e_pf_rxq_wait(pf, pf_q, enable);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -756,11 +756,7 @@ static s32 __igb_access_xmdio_reg(struct e1000_hw *hw, u16 address,
|
|||
return ret_val;
|
||||
|
||||
/* Recalibrate the device back to 0 */
|
||||
ret_val = hw->phy.ops.write_reg(hw, E1000_MMDAC, 0);
|
||||
if (ret_val)
|
||||
return ret_val;
|
||||
|
||||
return ret_val;
|
||||
return hw->phy.ops.write_reg(hw, E1000_MMDAC, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -675,11 +675,7 @@ static s32 __igc_access_xmdio_reg(struct igc_hw *hw, u16 address,
|
|||
return ret_val;
|
||||
|
||||
/* Recalibrate the device back to 0 */
|
||||
ret_val = hw->phy.ops.write_reg(hw, IGC_MMDAC, 0);
|
||||
if (ret_val)
|
||||
return ret_val;
|
||||
|
||||
return ret_val;
|
||||
return hw->phy.ops.write_reg(hw, IGC_MMDAC, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2478,7 +2478,6 @@ static int netxen_parse_md_template(struct netxen_adapter *adapter)
|
|||
static int
|
||||
netxen_collect_minidump(struct netxen_adapter *adapter)
|
||||
{
|
||||
int ret = 0;
|
||||
struct netxen_minidump_template_hdr *hdr;
|
||||
hdr = (struct netxen_minidump_template_hdr *)
|
||||
adapter->mdump.md_template;
|
||||
|
|
@ -2486,11 +2485,7 @@ netxen_collect_minidump(struct netxen_adapter *adapter)
|
|||
hdr->driver_timestamp = ktime_get_seconds();
|
||||
hdr->driver_info_word2 = adapter->fw_version;
|
||||
hdr->driver_info_word3 = NXRD32(adapter, CRB_DRIVER_VERSION);
|
||||
ret = netxen_parse_md_template(adapter);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return ret;
|
||||
return netxen_parse_md_template(adapter);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1618,11 +1618,7 @@ static int qlcnic_83xx_check_hw_status(struct qlcnic_adapter *p_dev)
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
err = qlcnic_83xx_check_heartbeat(p_dev);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
return err;
|
||||
return qlcnic_83xx_check_heartbeat(p_dev);
|
||||
}
|
||||
|
||||
static int qlcnic_83xx_poll_reg(struct qlcnic_adapter *p_dev, u32 addr,
|
||||
|
|
|
|||
|
|
@ -685,7 +685,6 @@ static void rtsn_set_rate(struct rtsn_private *priv)
|
|||
static int rtsn_rmac_init(struct rtsn_private *priv)
|
||||
{
|
||||
const u8 *mac_addr = priv->ndev->dev_addr;
|
||||
int ret;
|
||||
|
||||
/* Set MAC address */
|
||||
rtsn_write(priv, MRMAC0, (mac_addr[0] << 8) | mac_addr[1]);
|
||||
|
|
@ -702,11 +701,7 @@ static int rtsn_rmac_init(struct rtsn_private *priv)
|
|||
|
||||
/* Link verification */
|
||||
rtsn_modify(priv, MLVC, MLVC_PLV, MLVC_PLV);
|
||||
ret = rtsn_reg_wait(priv, MLVC, MLVC_PLV, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return ret;
|
||||
return rtsn_reg_wait(priv, MLVC, MLVC_PLV, 0);
|
||||
}
|
||||
|
||||
static int rtsn_hw_init(struct rtsn_private *priv)
|
||||
|
|
|
|||
|
|
@ -1028,11 +1028,7 @@ static int lan87xx_read_status(struct phy_device *phydev)
|
|||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
rc = genphy_read_status_fixed(phydev);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
return rc;
|
||||
return genphy_read_status_fixed(phydev);
|
||||
}
|
||||
|
||||
static int lan87xx_config_aneg(struct phy_device *phydev)
|
||||
|
|
|
|||
|
|
@ -1520,11 +1520,7 @@ static int tps23881_i2c_probe(struct i2c_client *client)
|
|||
"failed to register PSE controller\n");
|
||||
}
|
||||
|
||||
ret = tps23881_setup_irq(priv, client->irq);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return ret;
|
||||
return tps23881_setup_irq(priv, client->irq);
|
||||
}
|
||||
|
||||
static const struct i2c_device_id tps23881_id[] = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user