Skip to content

Commit b238e92

Browse files
Avenger-285714MingcongBai
authored andcommitted
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 <[email protected]>
1 parent 1243429 commit b238e92

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/cadence/macb_main.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,8 @@ static void macb_mac_config(struct phylink_config *config, unsigned int mode,
683683
* Must be written after PCSSEL is set in NCFGR,
684684
* otherwise writes will not take effect.
685685
*/
686-
if (macb_is_gem(bp) && state->interface == PHY_INTERFACE_MODE_SGMII) {
686+
if (macb_is_gem(bp) && (state->interface == PHY_INTERFACE_MODE_SGMII ||
687+
state->interface == PHY_INTERFACE_MODE_2500BASEX)) {
687688
u32 pcsctrl, old_pcsctrl;
688689

689690
old_pcsctrl = gem_readl(bp, PCSCNTRL);

0 commit comments

Comments
 (0)