diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2019-10-15 11:28:46 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-15 20:40:06 -0700 |
commit | 554032cdfbf4491f38241a3f6b27459408d90df3 (patch) | |
tree | c3e77da219f5f4f5e6614499b49be83e00c83c15 /include/linux/linkmode.h | |
parent | 4980b2c4fe55b9244990ae257d1fb659c6eb5cd7 (diff) | |
download | linux-554032cdfbf4491f38241a3f6b27459408d90df3.tar.gz linux-554032cdfbf4491f38241a3f6b27459408d90df3.tar.bz2 linux-554032cdfbf4491f38241a3f6b27459408d90df3.zip |
net: phylink: use more linkmode_*
Use more linkmode_* helpers rather than open-coding the bitmap
operations.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/linkmode.h')
-rw-r--r-- | include/linux/linkmode.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/linkmode.h b/include/linux/linkmode.h index a99c58866860..fe740031339d 100644 --- a/include/linux/linkmode.h +++ b/include/linux/linkmode.h @@ -82,4 +82,10 @@ static inline int linkmode_equal(const unsigned long *src1, return bitmap_equal(src1, src2, __ETHTOOL_LINK_MODE_MASK_NBITS); } +static inline int linkmode_subset(const unsigned long *src1, + const unsigned long *src2) +{ + return bitmap_subset(src1, src2, __ETHTOOL_LINK_MODE_MASK_NBITS); +} + #endif /* __LINKMODE_H */ |