cxgb4: Use proper enum in IEEE_FAUX_SYNC
authorNathan Chancellor <natechancellor@gmail.com>
Mon, 1 Oct 2018 03:47:38 +0000 (20:47 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 Oct 2018 05:30:52 +0000 (22:30 -0700)
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: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h

index 02040b99c78a0561da461c1497a26bfb92ce2f40..484ee829009036883efde95754d419930f7e096c 100644 (file)
@@ -67,7 +67,7 @@
        do { \
                if ((__dcb)->dcb_version == FW_PORT_DCB_VER_IEEE) \
                        cxgb4_dcb_state_fsm((__dev), \
-                                           CXGB4_DCB_STATE_FW_ALLSYNCED); \
+                                           CXGB4_DCB_INPUT_FW_ALLSYNCED); \
        } while (0)
 
 /* States we can be in for a port's Data Center Bridging.