]> git.baikalelectronics.ru Git - kernel.git/commit
cxgb4: Use proper enum in cxgb4_dcb_handle_fw_update
authorNathan Chancellor <natechancellor@gmail.com>
Mon, 1 Oct 2018 03:51:43 +0000 (20:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 Oct 2018 05:30:26 +0000 (22:30 -0700)
commite590c8af5332d01d7c2babd9a24d652773f5b2ab
tree3dbe41632f0c9b132a98c297237c8b0ca9ffb623
parent9476f876274cccc4687b31abac7ef218be2e635d
cxgb4: Use proper enum in cxgb4_dcb_handle_fw_update

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: 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.c