vmci(4): Fix GCC build and rationalize vmci_kernel_defs.h
To fix the GCC build, remove multiple redundant declarations of vmci_send_datagram() (the copy in vmci.h as well as the extern definition in vmci_queue_pair.c were wholly redundant). Also to fix the GCC build, include a non-empty format string in the vmci(4) definition of ASSERT(). It seems harmless either way, but adding the stringified invariant is easier than masking the warning. The other vmci_kernel_defs.h changes are cosmetic and simply match macros to existing definitions. Reported by: GCC 6.4.0 Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
ec88403d3f
commit
7953f98e23
@ -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_ */
|
||||
|
@ -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_ */
|
||||
|
@ -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 *);
|
||||
|
||||
/*
|
||||
*------------------------------------------------------------------------------
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user