> The return value is never checked by its sole caller and the speed > validation duplicates a check higher up the call stack. Convert to > void and remove the dead code. > > Reviewed-by: Maxime Chevallier > Signed-off-by: Mohd Ayaan Anwar Acked-by: Lorenzo Bianconi > --- > drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 10 +--------- > 1 file changed, 1 insertion(+), 9 deletions(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > index ac7d6d3e205a1ab5b391def879d6f1033a0961b6..44270c25d874f72e7f971757fec659d36468c315 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > @@ -371,9 +371,8 @@ static int ethqos_dll_configure(struct qcom_ethqos *ethqos) > return 0; > } > > -static int ethqos_rgmii_macro_init(struct qcom_ethqos *ethqos, int speed) > +static void ethqos_rgmii_macro_init(struct qcom_ethqos *ethqos, int speed) > { > - struct device *dev = ðqos->pdev->dev; > unsigned int prg_rclk_dly, loopback; > unsigned int phase_shift; > > @@ -384,11 +383,6 @@ static int ethqos_rgmii_macro_init(struct qcom_ethqos *ethqos, int speed) > /* Select RGMII, write 0 to interface select */ > rgmii_clrmask(ethqos, RGMII_CONFIG_INTF_SEL, RGMII_IO_MACRO_CONFIG); > > - if (speed != SPEED_1000 && speed != SPEED_100 && speed != SPEED_10) { > - dev_err(dev, "Invalid speed %d\n", speed); > - return -EINVAL; > - } > - > rgmii_setmask(ethqos, RGMII_CONFIG_DDR_MODE, RGMII_IO_MACRO_CONFIG); > > if (speed == SPEED_1000) { > @@ -479,8 +473,6 @@ static int ethqos_rgmii_macro_init(struct qcom_ethqos *ethqos, int speed) > > rgmii_updatel(ethqos, RGMII_CONFIG_LOOPBACK_EN, loopback, > RGMII_IO_MACRO_CONFIG); > - > - return 0; > } > > static void ethqos_fix_mac_speed_rgmii(void *bsp_priv, > > -- > 2.34.1 > >