aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/vmware/vmci/vmci.h1
-rw-r--r--sys/dev/vmware/vmci/vmci_kernel_defs.h14
-rw-r--r--sys/dev/vmware/vmci/vmci_queue_pair.c2
3 files changed, 7 insertions, 10 deletions
diff --git a/sys/dev/vmware/vmci/vmci.h b/sys/dev/vmware/vmci/vmci.h
index ba4a99cd90c8..4177bd474c90 100644
--- a/sys/dev/vmware/vmci/vmci.h
+++ b/sys/dev/vmware/vmci/vmci.h
@@ -73,7 +73,6 @@ struct vmci_softc {
int vmci_dma_malloc(bus_size_t size, bus_size_t align,
struct vmci_dma_alloc *dma);
void vmci_dma_free(struct vmci_dma_alloc *);
-int vmci_send_datagram(struct vmci_datagram *dg);
int vmci_schedule_delayed_work_fn(vmci_work_fn *work_fn, void *data);
#endif /* !_VMCI_H_ */
diff --git a/sys/dev/vmware/vmci/vmci_kernel_defs.h b/sys/dev/vmware/vmci/vmci_kernel_defs.h
index 68f716057392..46eefd99289e 100644
--- a/sys/dev/vmware/vmci/vmci_kernel_defs.h
+++ b/sys/dev/vmware/vmci/vmci_kernel_defs.h
@@ -16,17 +16,17 @@
typedef uint32_t PPN;
-#define ASSERT(cond) KASSERT(cond, (""))
+#define ASSERT(cond) KASSERT(cond, ("%s", #cond))
#define ASSERT_ON_COMPILE(e) _Static_assert(e, #e);
-#define LIKELY(_exp) __builtin_expect(!!(_exp), 1)
-#define UNLIKELY(_exp) __builtin_expect((_exp), 0)
+#define LIKELY(_exp) __predict_true(_exp)
+#define UNLIKELY(_exp) __predict_false(_exp)
-#define CONST64U(c) c##uL
+#define CONST64U(c) UINT64_C(c)
-#define ARRAYSIZE(a) (sizeof(a) / sizeof(*(a)))
+#define ARRAYSIZE(a) nitems(a)
-#define ROUNDUP(x, y) (((x) + (y) - 1) / (y) * (y))
-#define CEILING(x, y) (((x) + (y) - 1) / (y))
+#define ROUNDUP(x, y) roundup(x, y)
+#define CEILING(x, y) howmany(x, y)
#endif /* !_VMCI_KERNEL_DEFS_H_ */
diff --git a/sys/dev/vmware/vmci/vmci_queue_pair.c b/sys/dev/vmware/vmci/vmci_queue_pair.c
index 3c6dfecccae1..851008904e80 100644
--- a/sys/dev/vmware/vmci/vmci_queue_pair.c
+++ b/sys/dev/vmware/vmci/vmci_queue_pair.c
@@ -74,8 +74,6 @@ static int vmci_queue_pair_alloc_guest_work(struct vmci_handle *handle,
static int vmci_queue_pair_detach_guest_work(struct vmci_handle handle);
static int vmci_queue_pair_detach_hypercall(struct vmci_handle handle);
-extern int vmci_send_datagram(struct vmci_datagram *);
-
/*
*------------------------------------------------------------------------------
*