Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Wenum-conversion in drivers/infiniband/sw/siw/siw_cq.c #596

Closed
nathanchance opened this issue Jul 10, 2019 · 2 comments
Closed

-Wenum-conversion in drivers/infiniband/sw/siw/siw_cq.c #596

nathanchance opened this issue Jul 10, 2019 · 2 comments
Assignees
Labels
-Wenum-conversion [BUG] linux-next This is an issue only seen in linux-next [FIXED][LINUX] development cycle This bug was only present and fixed in a -next or -rc cycle

Comments

@nathanchance
Copy link
Member

drivers/infiniband/sw/siw/siw_cq.c:31:4: warning: implicit conversion from enumeration type 'enum siw_wc_status' to different enumeration type 'enum siw_opcode' [-Wenum-conversion]
        { SIW_WC_SUCCESS, IB_WC_SUCCESS },
        ~ ^~~~~~~~~~~~~~
drivers/infiniband/sw/siw/siw_cq.c:32:4: warning: implicit conversion from enumeration type 'enum siw_wc_status' to different enumeration type 'enum siw_opcode' [-Wenum-conversion]
        { SIW_WC_LOC_LEN_ERR, IB_WC_LOC_LEN_ERR },
        ~ ^~~~~~~~~~~~~~~~~~
drivers/infiniband/sw/siw/siw_cq.c:33:4: warning: implicit conversion from enumeration type 'enum siw_wc_status' to different enumeration type 'enum siw_opcode' [-Wenum-conversion]
        { SIW_WC_LOC_PROT_ERR, IB_WC_LOC_PROT_ERR },
        ~ ^~~~~~~~~~~~~~~~~~~
drivers/infiniband/sw/siw/siw_cq.c:34:4: warning: implicit conversion from enumeration type 'enum siw_wc_status' to different enumeration type 'enum siw_opcode' [-Wenum-conversion]
        { SIW_WC_LOC_QP_OP_ERR, IB_WC_LOC_QP_OP_ERR },
        ~ ^~~~~~~~~~~~~~~~~~~~
drivers/infiniband/sw/siw/siw_cq.c:35:4: warning: implicit conversion from enumeration type 'enum siw_wc_status' to different enumeration type 'enum siw_opcode' [-Wenum-conversion]
        { SIW_WC_WR_FLUSH_ERR, IB_WC_WR_FLUSH_ERR },
        ~ ^~~~~~~~~~~~~~~~~~~
drivers/infiniband/sw/siw/siw_cq.c:36:4: warning: implicit conversion from enumeration type 'enum siw_wc_status' to different enumeration type 'enum siw_opcode' [-Wenum-conversion]
        { SIW_WC_BAD_RESP_ERR, IB_WC_BAD_RESP_ERR },
        ~ ^~~~~~~~~~~~~~~~~~~
drivers/infiniband/sw/siw/siw_cq.c:37:4: warning: implicit conversion from enumeration type 'enum siw_wc_status' to different enumeration type 'enum siw_opcode' [-Wenum-conversion]
        { SIW_WC_LOC_ACCESS_ERR, IB_WC_LOC_ACCESS_ERR },
        ~ ^~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/sw/siw/siw_cq.c:38:4: warning: implicit conversion from enumeration type 'enum siw_wc_status' to different enumeration type 'enum siw_opcode' [-Wenum-conversion]
        { SIW_WC_REM_ACCESS_ERR, IB_WC_REM_ACCESS_ERR },
        ~ ^~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/sw/siw/siw_cq.c:39:4: warning: implicit conversion from enumeration type 'enum siw_wc_status' to different enumeration type 'enum siw_opcode' [-Wenum-conversion]
        { SIW_WC_REM_INV_REQ_ERR, IB_WC_REM_INV_REQ_ERR },
        ~ ^~~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/sw/siw/siw_cq.c:40:4: warning: implicit conversion from enumeration type 'enum siw_wc_status' to different enumeration type 'enum siw_opcode' [-Wenum-conversion]
        { SIW_WC_GENERAL_ERR, IB_WC_GENERAL_ERR }
        ~ ^~~~~~~~~~~~~~~~~~
10 warnings generated.

Patch sent: https://lore.kernel.org/lkml/2019071014800.34451-1-natechancellor@gmail.com/

@nathanchance nathanchance added -Wenum-conversion [PATCH] Submitted A patch has been submitted for review [BUG] linux-next This is an issue only seen in linux-next labels Jul 10, 2019
@nathanchance nathanchance self-assigned this Jul 10, 2019
@nathanchance
Copy link
Member Author

Patch accepted: https://git.kernel.org/rdma/rdma/c/775a41e281cf08b1d9e0f2dd89c062430b289a10

@nathanchance nathanchance added [PATCH] Accepted A submitted patch has been accepted upstream and removed [PATCH] Submitted A patch has been submitted for review labels Jul 10, 2019
@nathanchance
Copy link
Member Author

@nathanchance nathanchance added [FIXED][LINUX] development cycle This bug was only present and fixed in a -next or -rc cycle and removed [PATCH] Accepted A submitted patch has been accepted upstream labels Jul 12, 2019
avagin pushed a commit to avagin/linux that referenced this issue Jul 12, 2019
clang warns several times:

drivers/infiniband/sw/siw/siw_cq.c:31:4: warning: implicit conversion
from enumeration type 'enum siw_wc_status' to different enumeration type
'enum siw_opcode' [-Wenum-conversion]
        { SIW_WC_SUCCESS, IB_WC_SUCCESS },
        ~ ^~~~~~~~~~~~~~

Fixes: b0fff73 ("rdma/siw: completion queue methods")
Link: ClangBuiltLinux/linux#596
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Wenum-conversion [BUG] linux-next This is an issue only seen in linux-next [FIXED][LINUX] development cycle This bug was only present and fixed in a -next or -rc cycle
Projects
None yet
Development

No branches or pull requests

1 participant