summaryrefslogtreecommitdiffstats
path: root/sys/ofed/drivers
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-11-12 22:01:29 +0000
committerdim <dim@FreeBSD.org>2012-11-12 22:01:29 +0000
commit45f8cc9a6c2bd5c0fdd9ad9958505abec8294632 (patch)
tree52e45240c9fa8bba8621ee93bc4ee12c52162b75 /sys/ofed/drivers
parentfb83924633f5c89cb1aeb98503bf777376fe4a11 (diff)
downloadFreeBSD-src-45f8cc9a6c2bd5c0fdd9ad9958505abec8294632.zip
FreeBSD-src-45f8cc9a6c2bd5c0fdd9ad9958505abec8294632.tar.gz
Redo r242842, now actually fixing the warnings, as follows:
- In sys/ofed/drivers/infiniband/core/cma.c, an enum struct member is interpreted as an int, so cast it to an int. - In sys/ofed/drivers/infiniband/core/ud_header.c, initialize the packet_length variable in ib_ud_header_init(), to prevent undefined behaviour. - In sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c, call rdma_notify() with the correct enum type and value. - In sys/ofed/include/linux/pci.h, change the PCI_DEVICE and PCI_VDEVICE macros to use C99 struct initializers, so additional members can be overridden. Reviewed by: delphij, Garrett Cooper <yanegomi@gmail.com> MFC after: 1 week
Diffstat (limited to 'sys/ofed/drivers')
-rw-r--r--sys/ofed/drivers/infiniband/core/cma.c2
-rw-r--r--sys/ofed/drivers/infiniband/core/ud_header.c2
-rw-r--r--sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/sys/ofed/drivers/infiniband/core/cma.c b/sys/ofed/drivers/infiniband/core/cma.c
index 9867f10..34419f3 100644
--- a/sys/ofed/drivers/infiniband/core/cma.c
+++ b/sys/ofed/drivers/infiniband/core/cma.c
@@ -1312,7 +1312,7 @@ static int cma_iw_handler(struct iw_cm_id *iw_id, struct iw_cm_event *iw_event)
*sin = iw_event->local_addr;
sin = (struct sockaddr_in *) &id_priv->id.route.addr.dst_addr;
*sin = iw_event->remote_addr;
- switch (iw_event->status) {
+ switch ((int)iw_event->status) {
case 0:
event.event = RDMA_CM_EVENT_ESTABLISHED;
break;
diff --git a/sys/ofed/drivers/infiniband/core/ud_header.c b/sys/ofed/drivers/infiniband/core/ud_header.c
index e095a12..09fc1ff 100644
--- a/sys/ofed/drivers/infiniband/core/ud_header.c
+++ b/sys/ofed/drivers/infiniband/core/ud_header.c
@@ -230,7 +230,7 @@ void ib_ud_header_init(int payload_bytes,
int immediate_present,
struct ib_ud_header *header)
{
- u16 packet_length;
+ u16 packet_length = 0;
memset(header, 0, sizeof *header);
diff --git a/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c b/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c
index de4b80b..f8d6181 100644
--- a/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c
+++ b/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c
@@ -590,7 +590,7 @@ sdp_rx_comp_work(struct work_struct *work)
if (unlikely(!ssk->poll_cq)) {
struct rdma_cm_id *id = ssk->id;
if (id && id->qp)
- rdma_notify(id, RDMA_CM_EVENT_ESTABLISHED);
+ rdma_notify(id, IB_EVENT_COMM_EST);
goto out;
}
OpenPOWER on IntegriCloud