rdma/siw: Use proper enumerated type in map_cqe_status
authorNathan Chancellor <natechancellor@gmail.com>
Wed, 10 Jul 2019 17:48:00 +0000 (10:48 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 10 Jul 2019 18:25:30 +0000 (15:25 -0300)
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: b0fff7317bb4 ("rdma/siw: completion queue methods")
Link: https://github.com/ClangBuiltLinux/linux/issues/596
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/sw/siw/siw_cq.c

index e2a0ee40d5b5e49f4c53cf68d796caf68b8c3eda..e381ae9b7d62498ed6b8ab8a9a4d04ea2f1f92eb 100644 (file)
@@ -25,7 +25,7 @@ static int map_wc_opcode[SIW_NUM_OPCODES] = {
 };
 
 static struct {
-       enum siw_opcode siw;
+       enum siw_wc_status siw;
        enum ib_wc_status ib;
 } map_cqe_status[SIW_NUM_WC_STATUS] = {
        { SIW_WC_SUCCESS, IB_WC_SUCCESS },