From fa2dd2722dcc7cd0674bc08e6cd4f200a1d5fed4 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Mon, 28 Oct 2019 15:32:02 +0900 Subject: [PATCH] lib/scsi: Move scsi_task_free_data() in a file to remove function declaration Signed-off-by: Shuhei Matsumoto Change-Id: I9c98ded51bf88cd199bace7b3703b86ed4a9c25b Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472519 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Changpeng Liu Reviewed-by: Ziye Yang Reviewed-by: Paul Luse --- lib/scsi/task.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/lib/scsi/task.c b/lib/scsi/task.c index 0058f642c..7fd8305ec 100644 --- a/lib/scsi/task.c +++ b/lib/scsi/task.c @@ -38,7 +38,16 @@ #include "spdk/util.h" static void -scsi_task_free_data(struct spdk_scsi_task *task); +scsi_task_free_data(struct spdk_scsi_task *task) +{ + if (task->alloc_len != 0) { + spdk_dma_free(task->iov.iov_base); + task->alloc_len = 0; + } + + task->iov.iov_base = NULL; + task->iov.iov_len = 0; +} void spdk_scsi_task_put(struct spdk_scsi_task *task) @@ -85,18 +94,6 @@ spdk_scsi_task_construct(struct spdk_scsi_task *task, task->iovcnt = 1; } -static void -scsi_task_free_data(struct spdk_scsi_task *task) -{ - if (task->alloc_len != 0) { - spdk_dma_free(task->iov.iov_base); - task->alloc_len = 0; - } - - task->iov.iov_base = NULL; - task->iov.iov_len = 0; -} - static void * scsi_task_alloc_data(struct spdk_scsi_task *task, uint32_t alloc_len) {