Commit 4fb468e0 authored by Ben Walker's avatar Ben Walker
Browse files

nvmf: Remove memcpy from completion path



This can just directly assign the completion instead
of calling memcpy.

Change-Id: I07819c824eba45245b00fa3538a99bc81bcb9fcc
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
parent af8b5732
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -59,12 +59,10 @@ static void
nvmf_direct_ctrlr_complete_cmd(void *ctx, const struct spdk_nvme_cpl *cmp)
{
	struct spdk_nvmf_request *req = ctx;
	struct spdk_nvme_cpl *response;

	spdk_trace_record(TRACE_NVMF_LIB_COMPLETE, 0, 0, (uint64_t)req, 0);

	response = &req->rsp->nvme_cpl;
	memcpy(response, cmp, sizeof(*cmp));
	req->rsp->nvme_cpl = *cmp;

	spdk_nvmf_request_complete(req);
}