public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH 2/4] net: phy: drop #ifdef CONFIG_DM_ETH around phy_connect_fixed
Date: Wed, 17 Feb 2021 00:48:02 +0200	[thread overview]
Message-ID: <20210216224804.3355044-3-olteanv@gmail.com> (raw)
In-Reply-To: <20210216224804.3355044-1-olteanv@gmail.com>

From: Vladimir Oltean <vladimir.oltean@nxp.com>

In drivers/net/phy/Kconfig, CONFIG_PHY_FIXED already depends on
CONFIG_DM_ETH, so the function prototype definition when CONFIG_DM_ETH=n
does nothing, so it can be dropped. It is also never reachable, since
the whole function is already under #ifdef CONFIG_PHY_FIXED (which
again, as I said, depends on CONFIG_DM_ETH=y).

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/net/phy/phy.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 2feb559bba97..eae40cc0d6b7 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -1012,15 +1012,9 @@ struct phy_device *fixed_phy_create(ofnode node)
 	return phydev;
 }
 
-#ifdef CONFIG_DM_ETH
 static struct phy_device *phy_connect_fixed(struct mii_dev *bus,
 					    struct udevice *dev,
 					    phy_interface_t interface)
-#else
-static struct phy_device *phy_connect_fixed(struct mii_dev *bus,
-					    struct eth_device *dev,
-					    phy_interface_t interface)
-#endif
 {
 	ofnode node = dev_ofnode(dev), subnode;
 	struct phy_device *phydev;
-- 
2.25.1

  parent reply	other threads:[~2021-02-16 22:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 22:48 [PATCH 0/4] Sandbox driver for DSA uclass Vladimir Oltean
2021-02-16 22:48 ` [PATCH 1/4] net: phy: fixed: be compatible with live OF tree Vladimir Oltean
2021-03-12  6:34   ` Bin Meng
2021-03-12  7:53     ` Bin Meng
2021-02-16 22:48 ` Vladimir Oltean [this message]
2021-03-11  9:37   ` [PATCH 2/4] net: phy: drop #ifdef CONFIG_DM_ETH around phy_connect_fixed Bin Meng
2021-02-16 22:48 ` [PATCH 3/4] net: mdio: teach dm_eth_phy_connect to connect to fixed PHY Vladimir Oltean
2021-03-12  3:29   ` Bin Meng
2021-02-16 22:48 ` [PATCH 4/4] sandbox: add a DSA sandbox driver and unit test Vladimir Oltean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210216224804.3355044-3-olteanv@gmail.com \
    --to=olteanv@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox