Skip to content

Commit

Permalink
net: macb: phytium-gem: donot convert the enum constant to a boolean
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Avenger-285714 committed Nov 25, 2024
1 parent a42b050 commit 08e335d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/cadence/macb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 08e335d

Please sign in to comment.