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: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9013 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
2f85499e43
commit
42abbac90e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user