* [PATCH] rdma/siw: fix enum type mismatch warnings
@ 2019-07-12 8:53 Arnd Bergmann
2019-07-12 11:38 ` Bernard Metzler
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2019-07-12 8:53 UTC (permalink / raw)
To: Bernard Metzler, Doug Ledford, Jason Gunthorpe
Cc: Arnd Bergmann, Jason Gunthorpe, linux-rdma, linux-kernel
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.
Fixes: b0fff7317bb4 ("rdma/siw: completion queue methods")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/infiniband/sw/siw/siw_cq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/sw/siw/siw_cq.c b/drivers/infiniband/sw/siw/siw_cq.c
index e2a0ee40d5b5..e381ae9b7d62 100644
--- a/drivers/infiniband/sw/siw/siw_cq.c
+++ b/drivers/infiniband/sw/siw/siw_cq.c
@@ -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 },
--
2.20.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rdma/siw: fix enum type mismatch warnings
2019-07-12 8:53 [PATCH] rdma/siw: fix enum type mismatch warnings Arnd Bergmann
@ 2019-07-12 11:38 ` Bernard Metzler
0 siblings, 0 replies; 2+ messages in thread
From: Bernard Metzler @ 2019-07-12 11:38 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Doug Ledford, Jason Gunthorpe, Jason Gunthorpe, linux-rdma, linux-kernel
-----"Arnd Bergmann" <arnd@arndb.de> wrote: -----
>To: "Bernard Metzler" <bmt@zurich.ibm.com>, "Doug Ledford"
><dledford@redhat.com>, "Jason Gunthorpe" <jgg@ziepe.ca>
>From: "Arnd Bergmann" <arnd@arndb.de>
>Date: 07/12/2019 10:53AM
>Cc: "Arnd Bergmann" <arnd@arndb.de>, "Jason Gunthorpe"
><jgg@mellanox.com>, linux-rdma@vger.kernel.org,
>linux-kernel@vger.kernel.org
>Subject: [EXTERNAL] [PATCH] 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.
>
>Fixes: b0fff7317bb4 ("rdma/siw: completion queue methods")
>Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>---
> drivers/infiniband/sw/siw/siw_cq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/infiniband/sw/siw/siw_cq.c
>b/drivers/infiniband/sw/siw/siw_cq.c
>index e2a0ee40d5b5..e381ae9b7d62 100644
>--- a/drivers/infiniband/sw/siw/siw_cq.c
>+++ b/drivers/infiniband/sw/siw/siw_cq.c
>@@ -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 },
>--
>2.20.0
>
>
Hi Arnd, this got already fixed.
Many thanks!
Bernard.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-12 11:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-12 8:53 [PATCH] rdma/siw: fix enum type mismatch warnings Arnd Bergmann
2019-07-12 11:38 ` Bernard Metzler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).