rdma/siw: fix enum type mismatch warnings
Subsystems (2)
PATCH 1/1 rdma/siw: fix enum type mismatch warnings
The values in map_cqe_status[] don't match the type:
drivers/infiniband/sw/siw/siw_cq.c:31:4: error: implicit conversion from enumeration type 'enum siw_wc_status' to different enumeration type 'enum siw_opcode' [-Werror,-Wenum-conversion]
{ SIW_WC_SUCCESS, IB_WC_SUCCESS },
~ ^~~~~~~~~~~~~~drivers/infiniband/sw/siw/siw_cq.c:32:4: error: implicit conversion from enumeration type 'enum siw_wc_status' to different enumeration type 'enum siw_opcode' [-Werror,-Wenum-conversion]
{ SIW_WC_LOC_LEN_ERR, IB_WC_LOC_LEN_ERR },
~ ^~~~~~~~~~~~~~~~~~Change the struct definition to make them match and stop the warning.
--- drivers/infiniband/sw/siw/siw_cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/sw/siw/siw_cq.c +1 -1
@@ -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 },
Signature · 1 line
2.20.0
-----"Arnd Bergmann" <[email protected]> wrote: -----
Quoted 49 lines
To: "Bernard Metzler" <[email protected]>, "Doug Ledford" <[email protected]>, "Jason Gunthorpe" <[email protected]>
From: "Arnd Bergmann" <[email protected]>
Date: 07/12/2019 10:53AM
Cc: "Arnd Bergmann" <[email protected]>, "Jason Gunthorpe" <[email protected]>, [email protected], [email protected]
Subject: [EXTERNAL] [PATCH] rdma/siw: fix enum type mismatch warningsThe values in map_cqe_status[] don't match the type:
drivers/infiniband/sw/siw/siw_cq.c:31:4: error: implicit conversion from enumeration type 'enumsiw_wc_status' to different enumeration type 'enumsiw_opcode' [-Werror,-Wenum-conversion]
{SIW_WC_SUCCESS,IB_WC_SUCCESS},
~ ^~~~~~~~~~~~~~drivers/infiniband/sw/siw/siw_cq.c:32:4: error: implicit conversion from enumeration type 'enumsiw_wc_status' to different enumeration type 'enumsiw_opcode' [-Werror,-Wenum-conversion]{ SIW_WC_LOC_LEN_ERR, IB_WC_LOC_LEN_ERR }, ~ ^~~~~~~~~~~~~~~~~~Change the struct definition to make them match and stop the warning.
Fixes b0fff7317bb4 ("rdma/siw: completion queue methods")Signed-off-by Arnd Bergmann <[email protected]>---
drivers/infiniband/sw/siw/siw_cq.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/infiniband/sw/siw/siw_cq.c +1
-1@@ -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 },Signature · 1 line
2.20.0
Hi Arnd, this got already fixed.
Many thanks!
Bernard.