From 56684eee967a2ddc1223eccc7d3f0d7855040a5a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 24 Apr 2012 07:54:33 +0000 Subject: [PATCH] ib_srpt: Change return value of srpt_handle_tsk_mgmt() from u8 into void git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4220 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 634bb752c..f22232af8 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -1704,8 +1704,6 @@ err: /** * srpt_handle_tsk_mgmt() - Process an SRP_TSK_MGMT information unit. * - * Returns SCST_MGMT_STATUS_SUCCESS upon success. - * * Each task management function is performed by calling one of the * scst_rx_mgmt_fn*() functions. These functions will either report failure * or process the task management function asynchronously. The function @@ -1717,14 +1715,14 @@ err: * For more information about SRP_TSK_MGMT information units, see also section * 6.7 in the SRP r16a document. */ -static u8 srpt_handle_tsk_mgmt(struct srpt_rdma_ch *ch, - struct srpt_recv_ioctx *recv_ioctx, - struct srpt_send_ioctx *send_ioctx) +static void srpt_handle_tsk_mgmt(struct srpt_rdma_ch *ch, + struct srpt_recv_ioctx *recv_ioctx, + struct srpt_send_ioctx *send_ioctx) { struct srp_tsk_mgmt *srp_tsk; int ret; - ret = SCST_MGMT_STATUS_FAILED; + ret = -EOPNOTSUPP; BUG_ON(!send_ioctx); BUG_ON(send_ioctx->ch != ch); @@ -1773,13 +1771,13 @@ static u8 srpt_handle_tsk_mgmt(struct srpt_rdma_ch *ch, break; default: TRACE_DBG("Unsupported task management function."); - ret = SCST_MGMT_STATUS_FN_NOT_SUPPORTED; } - if (ret != SCST_MGMT_STATUS_SUCCESS) + if (ret != 0) { + PRINT_ERROR("Processing task management function %d failed: %d", + srp_tsk->tsk_mgmt_func, ret); srpt_put_send_ioctx(send_ioctx); - - return ret; + } } static u8 scst_to_srp_tsk_mgmt_status(const int scst_mgmt_status)