lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20250510102348.14134-3-ansuelsmth@gmail.com> Date: Sat, 10 May 2025 12:23:22 +0200 From: Christian Marangi <ansuelsmth@...il.com> To: Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Lorenzo Bianconi <lorenzo@...nel.org>, Heiner Kallweit <hkallweit1@...il.com>, Russell King <linux@...linux.org.uk>, Philipp Zabel <p.zabel@...gutronix.de>, Christian Marangi <ansuelsmth@...il.com>, Daniel Golle <daniel@...rotopia.org>, netdev@...r.kernel.org, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, linux-mediatek@...ts.infradead.org Subject: [net-next PATCH v3 02/11] net: phy: introduce phy_interface_copy helper Introduce phy_interface_copy helper as a shorthand to copy the PHY interface bitmap to a different location. This is useful if a PHY interface bitmap needs to be stored in a different variable and needs to be reset to an original value saved in a different bitmap. Signed-off-by: Christian Marangi <ansuelsmth@...il.com> --- include/linux/phy.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/phy.h b/include/linux/phy.h index d62d292024bc..9f0e5fb30d63 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -173,6 +173,11 @@ static inline void phy_interface_or(unsigned long *dst, const unsigned long *a, bitmap_or(dst, a, b, PHY_INTERFACE_MODE_MAX); } +static inline void phy_interface_copy(unsigned long *dst, const unsigned long *src) +{ + bitmap_copy(dst, src, PHY_INTERFACE_MODE_MAX); +} + static inline void phy_interface_set_rgmii(unsigned long *intf) { __set_bit(PHY_INTERFACE_MODE_RGMII, intf); -- 2.48.1
Powered by blists - more mailing lists