]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: mdio: harden for_each_port macro
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Sun, 3 May 2026 16:20:38 +0000 (18:20 +0200)
committerRobert Marko <robimarko@gmail.com>
Tue, 5 May 2026 11:12:17 +0000 (13:12 +0200)
In case someone calls the macro with other helpers this might
break the code. Add brackets for consistency.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23204
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c

index dbad94845527acd84a84a1f0ba91a2ca9852b5e3..9979b8a4494f63ee46f7eb81fc32bd01c3a7576f 100644 (file)
 #define RTMDIO_931X_SMI_10GPHY_POLLING_SEL4    (0x0D00)
 
 #define for_each_port(ctrl, pn) \
-       for_each_set_bit(pn, ctrl->valid_ports, RTMDIO_MAX_PORTS)
+       for_each_set_bit(pn, (ctrl)->valid_ports, RTMDIO_MAX_PORTS)
 
 /*
  * On all Realtek switch platforms the hardware periodically reads the link status of all