diff options
| author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2025-08-31 20:34:33 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-09-03 02:23:13 +0300 |
| commit | 4beb44a2d62dddfe450f310aa1a950901731cb3a (patch) | |
| tree | ee20f6c364e8d2f147a3fb905aa5278d55b95043 /include | |
| parent | fa390321aba0a54d0f7ae95ee4ecde1358bb9234 (diff) | |
| download | linux-4beb44a2d62dddfe450f310aa1a950901731cb3a.tar.xz | |
net: phy: add phy_interface_weight()
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/E1uslwn-00000001SOx-0a7H@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/phy.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 4c2b8b6e7187..bb45787d8684 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 unsigned int phy_interface_weight(const unsigned long *intf) +{ + return bitmap_weight(intf, PHY_INTERFACE_MODE_MAX); +} + static inline void phy_interface_and(unsigned long *dst, const unsigned long *a, const unsigned long *b) { |
