diff mbox series

[V2,43/49] net: dwc_eth_qos: fix build break when CLK not enabled

Message ID 20220627032455.28280-44-peng.fan@oss.nxp.com
State Superseded
Delegated to: Stefano Babic
Headers show
Series imx: support i.MX93 | expand

Commit Message

Peng Fan (OSS) June 27, 2022, 3:24 a.m. UTC
From: Peng Fan <peng.fan@nxp.com>

When CONFIG_CLK is not enabled, there will be buil break:
"error: ‘eqos’ undeclared (first use in this function)"

Should not guard the eqos under CONFIG_CLK macro

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/net/dwc_eth_qos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ramon Fried July 3, 2022, 7:21 p.m. UTC | #1
On Mon, Jun 27, 2022 at 5:44 AM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote:
>
> From: Peng Fan <peng.fan@nxp.com>
>
> When CONFIG_CLK is not enabled, there will be buil break:
> "error: ‘eqos’ undeclared (first use in this function)"
>
> Should not guard the eqos under CONFIG_CLK macro
>
Please rephrase - the english is a bit broken
something like:
Take eqos definition out the CONFIG_CLK ifdef.

> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  drivers/net/dwc_eth_qos.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
> index 9d255cf95ff..6048d56ff8c 100644
> --- a/drivers/net/dwc_eth_qos.c
> +++ b/drivers/net/dwc_eth_qos.c
> @@ -1774,11 +1774,11 @@ static int eqos_remove_resources_tegra186(struct udevice *dev)
>
>  static int eqos_remove_resources_stm32(struct udevice *dev)
>  {
> -#ifdef CONFIG_CLK
>         struct eqos_priv *eqos = dev_get_priv(dev);
>
>         debug("%s(dev=%p):\n", __func__, dev);
>
> +#ifdef CONFIG_CLK
>         clk_free(&eqos->clk_tx);
>         clk_free(&eqos->clk_rx);
>         clk_free(&eqos->clk_master_bus);
> --
> 2.36.0
>
diff mbox series

Patch

diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
index 9d255cf95ff..6048d56ff8c 100644
--- a/drivers/net/dwc_eth_qos.c
+++ b/drivers/net/dwc_eth_qos.c
@@ -1774,11 +1774,11 @@  static int eqos_remove_resources_tegra186(struct udevice *dev)
 
 static int eqos_remove_resources_stm32(struct udevice *dev)
 {
-#ifdef CONFIG_CLK
 	struct eqos_priv *eqos = dev_get_priv(dev);
 
 	debug("%s(dev=%p):\n", __func__, dev);
 
+#ifdef CONFIG_CLK
 	clk_free(&eqos->clk_tx);
 	clk_free(&eqos->clk_rx);
 	clk_free(&eqos->clk_master_bus);