Commit 42abbac9 authored by Changpeng Liu's avatar Changpeng Liu
Browse files

nvmf/vfio-user: eliminate cq_next function



There is only one place to call it now, so just remove it.

Change-Id: Ib16d640c80dbe79df46c965c5ee8bcd092e57b0d
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9013


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarZiye Yang <ziye.yang@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 2f85499e
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -691,14 +691,6 @@ asq_setup(struct nvmf_vfio_user_ctrlr *ctrlr)
	return 0;
}

static inline uint16_t
cq_next(struct nvme_q *q)
{
	assert(q != NULL);
	assert(q->is_cq);
	return (q->tail + 1) % q->size;
}

static inline int
queue_index(uint16_t qid, int is_cq)
{
@@ -730,8 +722,9 @@ cq_is_full(struct nvmf_vfio_user_ctrlr *ctrlr, struct nvme_q *q)
{
	assert(ctrlr != NULL);
	assert(q != NULL);
	assert(q->is_cq);

	return cq_next(q) == *hdbl(ctrlr, q);
	return ((q->tail + 1) % q->size) == *hdbl(ctrlr, q);
}

static inline void