Commit 258b6d14 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by David S. Miller

cxgb4: Use proper enum in IEEE_FAUX_SYNC

Clang warns when one enumerated type is implicitly converted to another.

drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c:390:4: warning: implicit
conversion from enumeration type 'enum cxgb4_dcb_state' to different
enumeration type 'enum cxgb4_dcb_state_input' [-Wenum-conversion]
                        IEEE_FAUX_SYNC(dev, dcb);
                        ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h:70:10: note: expanded
from macro 'IEEE_FAUX_SYNC'
                                            CXGB4_DCB_STATE_FW_ALLSYNCED);
                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Use the equivalent value of the expected type to silence Clang while
resulting in no functional change.

CXGB4_DCB_STATE_FW_ALLSYNCED = CXGB4_DCB_INPUT_FW_ALLSYNCED = 3
Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3b0b8f0d
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
do { \ do { \
if ((__dcb)->dcb_version == FW_PORT_DCB_VER_IEEE) \ if ((__dcb)->dcb_version == FW_PORT_DCB_VER_IEEE) \
cxgb4_dcb_state_fsm((__dev), \ cxgb4_dcb_state_fsm((__dev), \
CXGB4_DCB_STATE_FW_ALLSYNCED); \ CXGB4_DCB_INPUT_FW_ALLSYNCED); \
} while (0) } while (0)
/* States we can be in for a port's Data Center Bridging. /* States we can be in for a port's Data Center Bridging.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment