From 760b3ff5cf6c9f647e5b6c564325e52d45b98f2e Mon Sep 17 00:00:00 2001 From: WangYuli Date: Thu, 21 Nov 2024 13:48:59 +0800 Subject: [PATCH] net: macb: phytium-gem: donot convert the enum constant to a boolean Fix follow error with clang-19: drivers/net/ethernet/cadence/macb_main.c:724:71: error: converting the enum constant to a boolean [-Werror,-Wint-in-bool-context] 724 | if (macb_is_gem(bp) && (state->interface == PHY_INTERFACE_MODE_SGMII || | ^ 1 error generated. Signed-off-by: WangYuli --- drivers/net/ethernet/cadence/macb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 4b4990071bba..7bcef9f7d356 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -722,7 +722,7 @@ static void macb_mac_config(struct phylink_config *config, unsigned int mode, * otherwise writes will not take effect. */ if (macb_is_gem(bp) && (state->interface == PHY_INTERFACE_MODE_SGMII || - PHY_INTERFACE_MODE_2500BASEX)) { + state->interface == PHY_INTERFACE_MODE_2500BASEX)) { u32 pcsctrl, old_pcsctrl; old_pcsctrl = gem_readl(bp, PCSCNTRL);