nvme: remove _nvme_io_qpair_destroy function

Since it is empty function. It  can be deleted.
Add nvme_assert to fix issue reported by scan-build.

Change-Id: Ia0e8f656e1dac0da7ec72f8404469ea1b0dcb40e
Signed-off-by: Liang Yan <liangx.yan@intel.com>
This commit is contained in:
Liang Yan 2015-09-23 15:20:33 +08:00 committed by Gerrit Code Review
parent 36eea2e1c2
commit 655d98f52e

View File

@ -150,6 +150,9 @@ nvme_io_qpair_print_command(struct nvme_qpair *qpair,
static void
nvme_qpair_print_command(struct nvme_qpair *qpair, struct nvme_command *cmd)
{
nvme_assert(qpair != NULL, ("qpair can not be NULL"));
nvme_assert(cmd != NULL, ("cmd can not be NULL"));
if (nvme_qpair_is_admin_queue(qpair)) {
nvme_admin_qpair_print_command(qpair, cmd);
} else {
@ -576,19 +579,13 @@ _nvme_admin_qpair_destroy(struct nvme_qpair *qpair)
nvme_admin_qpair_abort_aers(qpair);
}
static void
_nvme_io_qpair_destroy(struct nvme_qpair *qpair)
{
}
void
nvme_qpair_destroy(struct nvme_qpair *qpair)
{
struct nvme_tracker *tr;
if (nvme_qpair_is_io_queue(qpair)) {
_nvme_io_qpair_destroy(qpair);
} else {
if (nvme_qpair_is_admin_queue(qpair)) {
_nvme_admin_qpair_destroy(qpair);
}
if (qpair->cmd)