[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1uy9J3-00000005jID-1Gce@rmk-PC.armlinux.org.uk>
Date: Mon, 15 Sep 2025 14:31:45 +0100
From: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
To: Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
linux-arm-msm@...r.kernel.org,
"Marek Beh__n" <kabel@...nel.org>,
netdev@...r.kernel.org,
Paolo Abeni <pabeni@...hat.com>
Subject: [PATCH net-next 1/7] net: phy: add phy_interface_copy()
Add a helper for copying PHY interface bitmasks. This will be used by
the SFP bus code, which will then be moved to phylink in the subsequent
patches.
Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
---
include/linux/phy.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 04553419adc3..407dae517b2e 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -169,6 +169,11 @@ static inline bool phy_interface_empty(const unsigned long *intf)
return bitmap_empty(intf, PHY_INTERFACE_MODE_MAX);
}
+static inline void phy_interface_copy(unsigned long *d, const unsigned long *s)
+{
+ bitmap_copy(d, s, PHY_INTERFACE_MODE_MAX);
+}
+
static inline unsigned int phy_interface_weight(const unsigned long *intf)
{
return bitmap_weight(intf, PHY_INTERFACE_MODE_MAX);
--
2.47.3
Powered by blists - more mailing lists