Skip to content

Commit 4beb44a

Browse files
Russell King (Oracle)kuba-moo
authored andcommitted
net: phy: add phy_interface_weight()
Signed-off-by: Russell King (Oracle) <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent fa39032 commit 4beb44a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/linux/phy.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,11 @@ static inline bool phy_interface_empty(const unsigned long *intf)
169169
return bitmap_empty(intf, PHY_INTERFACE_MODE_MAX);
170170
}
171171

172+
static inline unsigned int phy_interface_weight(const unsigned long *intf)
173+
{
174+
return bitmap_weight(intf, PHY_INTERFACE_MODE_MAX);
175+
}
176+
172177
static inline void phy_interface_and(unsigned long *dst, const unsigned long *a,
173178
const unsigned long *b)
174179
{

0 commit comments

Comments
 (0)