]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: stmmac: qcom-ethqos: change ethqos_configure*() to return void
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Mon, 23 Feb 2026 09:34:26 +0000 (09:34 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 25 Feb 2026 01:43:22 +0000 (17:43 -0800)
The ethqos_configure*() family of functions always return zero, and the
return value is never checked. Change the int return type to void.

Reviewed-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1vuSKg-0000000ASbv-0iWL@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c

index 50b95fd19f9d69e706eddca5f863105f147e4cd9..168f0fed68c0d216a9e52861602de17becd75dd0 100644 (file)
@@ -100,7 +100,7 @@ struct ethqos_emac_driver_data {
 struct qcom_ethqos {
        struct platform_device *pdev;
        void __iomem *rgmii_base;
-       int (*configure_func)(struct qcom_ethqos *ethqos, int speed);
+       void (*configure_func)(struct qcom_ethqos *ethqos, int speed);
 
        unsigned int link_clk_rate;
        struct clk *link_clk;
@@ -522,7 +522,7 @@ static int ethqos_rgmii_macro_init(struct qcom_ethqos *ethqos, int speed)
        return 0;
 }
 
-static int ethqos_configure_rgmii(struct qcom_ethqos *ethqos, int speed)
+static void ethqos_configure_rgmii(struct qcom_ethqos *ethqos, int speed)
 {
        struct device *dev = &ethqos->pdev->dev;
        unsigned int i;
@@ -587,8 +587,6 @@ static int ethqos_configure_rgmii(struct qcom_ethqos *ethqos, int speed)
                ethqos_dll_configure(ethqos);
 
        ethqos_rgmii_macro_init(ethqos, speed);
-
-       return 0;
 }
 
 static void ethqos_set_serdes_speed(struct qcom_ethqos *ethqos, int speed)
@@ -607,7 +605,7 @@ static void ethqos_pcs_set_inband(struct stmmac_priv *priv, bool enable)
 /* On interface toggle MAC registers gets reset.
  * Configure MAC block for SGMII on ethernet phy link up
  */
-static int ethqos_configure_sgmii(struct qcom_ethqos *ethqos, int speed)
+static void ethqos_configure_sgmii(struct qcom_ethqos *ethqos, int speed)
 {
        struct net_device *dev = platform_get_drvdata(ethqos->pdev);
        struct stmmac_priv *priv = netdev_priv(dev);
@@ -638,11 +636,9 @@ static int ethqos_configure_sgmii(struct qcom_ethqos *ethqos, int speed)
                ethqos_pcs_set_inband(priv, true);
                break;
        }
-
-       return 0;
 }
 
-static int ethqos_configure(struct qcom_ethqos *ethqos, int speed)
+static void ethqos_configure(struct qcom_ethqos *ethqos, int speed)
 {
        return ethqos->configure_func(ethqos, speed);
 }