summaryrefslogtreecommitdiffstats
path: root/sys/ofed/include/linux
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/include/linux
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/include/linux')
-rw-r--r--sys/ofed/include/linux/pci.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/ofed/include/linux/pci.h b/sys/ofed/include/linux/pci.h
index b05f6f2..5d91e2d 100644
--- a/sys/ofed/include/linux/pci.h
+++ b/sys/ofed/include/linux/pci.h
@@ -73,10 +73,12 @@ struct pci_device_id {
#define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274
-#define PCI_VDEVICE(vendor, device) \
- PCI_VENDOR_ID_##vendor, (device), PCI_ANY_ID, PCI_ANY_ID, 0, 0
-#define PCI_DEVICE(vendor, device) \
- (vendor), (device), PCI_ANY_ID, PCI_ANY_ID, 0, 0
+#define PCI_VDEVICE(_vendor, _device) \
+ .vendor = PCI_VENDOR_ID_##_vendor, .device = (_device), \
+ .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
+#define PCI_DEVICE(_vendor, _device) \
+ .vendor = (_vendor), .device = (_device), \
+ .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
#define to_pci_dev(n) container_of(n, struct pci_dev, dev)
OpenPOWER on IntegriCloud