netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>, Andrew Lunn <andrew+netdev@lunn.ch>,
	Russell King - ARM Linux <linux@armlinux.org.uk>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>,
	David Miller <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH net-next 2/4] net: phy: fixed_phy: remove member no_carrier from struct fixed_phy
Date: Sun, 7 Sep 2025 00:01:02 +0200	[thread overview]
Message-ID: <deca9f14-55ba-4176-8535-bfdab618871f@gmail.com> (raw)
In-Reply-To: <e81be066-cc23-4055-aed7-2fbc86da1ff7@gmail.com>

After the recent removal of gpio support member no_carrier isn't
needed any longer.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/phy/fixed_phy.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
index 1ac17ef33..35ac29c3e 100644
--- a/drivers/net/phy/fixed_phy.c
+++ b/drivers/net/phy/fixed_phy.c
@@ -32,7 +32,6 @@ struct fixed_phy {
 	int addr;
 	struct phy_device *phydev;
 	struct fixed_phy_status status;
-	bool no_carrier;
 	int (*link_update)(struct net_device *, struct fixed_phy_status *);
 	struct list_head node;
 };
@@ -52,7 +51,7 @@ int fixed_phy_change_carrier(struct net_device *dev, bool new_carrier)
 
 	list_for_each_entry(fp, &fmb->phys, node) {
 		if (fp->addr == phydev->mdio.addr) {
-			fp->no_carrier = !new_carrier;
+			fp->status.link = new_carrier;
 			return 0;
 		}
 	}
@@ -67,8 +66,6 @@ static int fixed_mdio_read(struct mii_bus *bus, int phy_addr, int reg_num)
 
 	list_for_each_entry(fp, &fmb->phys, node) {
 		if (fp->addr == phy_addr) {
-			fp->status.link = !fp->no_carrier;
-
 			/* Issue callback if user registered it. */
 			if (fp->link_update)
 				fp->link_update(fp->phydev->attached_dev,
-- 
2.51.0



  parent reply	other threads:[~2025-09-06 22:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-06 21:59 [PATCH net-next 0/4] net: phy: fixed_phy: improvements Heiner Kallweit
2025-09-06 22:00 ` [PATCH net-next 1/4] net: phy: fixed_phy: remove unused interrupt support Heiner Kallweit
2025-09-06 22:01 ` Heiner Kallweit [this message]
2025-09-06 22:01 ` [PATCH net-next 3/4] net: phy: fixed_phy: add helper fixed_phy_find Heiner Kallweit
2025-09-06 22:02 ` [PATCH net-next 4/4] net: phy: fixed_phy: remove struct fixed_mdio_bus Heiner Kallweit
2025-09-10  1:30 ` [PATCH net-next 0/4] net: phy: fixed_phy: improvements patchwork-bot+netdevbpf

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=deca9f14-55ba-4176-8535-bfdab618871f@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).