From 5baeb8f80f15b642b0b59fb66c3145e0fac15e57 Mon Sep 17 00:00:00 2001 From: Markus Stockhausen Date: Sun, 3 May 2026 18:20:38 +0200 Subject: [PATCH] realtek: mdio: harden for_each_port macro In case someone calls the macro with other helpers this might break the code. Add brackets for consistency. Signed-off-by: Markus Stockhausen Link: https://github.com/openwrt/openwrt/pull/23204 Signed-off-by: Robert Marko --- .../realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c b/target/linux/realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c index dbad948455..9979b8a449 100644 --- a/target/linux/realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c +++ b/target/linux/realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c @@ -124,7 +124,7 @@ #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