39 lines
1.7 KiB
Diff
39 lines
1.7 KiB
Diff
|
From: Bruce Rogers <brogers@suse.com>
|
||
|
Date: Tue, 5 May 2020 13:33:49 -0600
|
||
|
Subject: add enum cast to avoid gcc10 warning
|
||
|
|
||
|
References: boo#1171139
|
||
|
|
||
|
Two enums are practically the same, and have been used interchangably
|
||
|
without problem. But gcc10 has flagged that usage as problematic.
|
||
|
Casting from one type to the other clears use the warning, and adds some
|
||
|
clarity that this is intentional usage.
|
||
|
|
||
|
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
||
|
---
|
||
|
src/drivers/infiniband/flexboot_nodnic.c | 4 ++--
|
||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/roms/ipxe/src/drivers/infiniband/flexboot_nodnic.c b/roms/ipxe/src/drivers/infiniband/flexboot_nodnic.c
|
||
|
index c13fcefc56866da67d701baa96b8..ac28949d3cca6b0c29a8a32165e7 100644
|
||
|
--- a/roms/ipxe/src/drivers/infiniband/flexboot_nodnic.c
|
||
|
+++ b/roms/ipxe/src/drivers/infiniband/flexboot_nodnic.c
|
||
|
@@ -365,7 +365,7 @@ static int flexboot_nodnic_create_qp ( struct ib_device *ibdev,
|
||
|
goto qp_alloc_err;
|
||
|
}
|
||
|
|
||
|
- status = nodnic_port_create_qp(&port->port_priv, qp->type,
|
||
|
+ status = nodnic_port_create_qp(&port->port_priv, (nodnic_queue_pair_type)qp->type,
|
||
|
qp->send.num_wqes * sizeof(struct nodnic_send_wqbb),
|
||
|
qp->send.num_wqes,
|
||
|
qp->recv.num_wqes * sizeof(struct nodnic_recv_wqe),
|
||
|
@@ -406,7 +406,7 @@ static void flexboot_nodnic_destroy_qp ( struct ib_device *ibdev,
|
||
|
struct flexboot_nodnic_port *port = &flexboot_nodnic->port[ibdev->port - 1];
|
||
|
struct flexboot_nodnic_queue_pair *flexboot_nodnic_qp = ib_qp_get_drvdata ( qp );
|
||
|
|
||
|
- nodnic_port_destroy_qp(&port->port_priv, qp->type,
|
||
|
+ nodnic_port_destroy_qp(&port->port_priv, (nodnic_queue_pair_type)qp->type,
|
||
|
flexboot_nodnic_qp->nodnic_queue_pair);
|
||
|
|
||
|
free(flexboot_nodnic_qp);
|