• Nathan Chancellor's avatar
    cxgb4: Use proper enum in cxgb4_dcb_handle_fw_update · 3b0b8f0d
    Nathan Chancellor authored
    Clang warns when one enumerated type is implicitly converted to another.
    
    drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c:303:7: warning: implicit
    conversion from enumeration type 'enum cxgb4_dcb_state' to different
    enumeration type 'enum cxgb4_dcb_state_input' [-Wenum-conversion]
                             ? CXGB4_DCB_STATE_FW_ALLSYNCED
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c:304:7: warning: implicit
    conversion from enumeration type 'enum cxgb4_dcb_state' to different
    enumeration type 'enum cxgb4_dcb_state_input' [-Wenum-conversion]
                             : CXGB4_DCB_STATE_FW_INCOMPLETE);
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    2 warnings generated.
    
    Use the equivalent value of the expected type to silence Clang while
    resulting in no functional change.
    
    CXGB4_DCB_STATE_FW_INCOMPLETE = CXGB4_DCB_INPUT_FW_INCOMPLETE = 2
    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>
    3b0b8f0d
cxgb4_dcb.c 33.5 KB