From 10f712bc99e472657555ab7e9d9f0565db528ae8 Mon Sep 17 00:00:00 2001 From: wanghailiangx Date: Wed, 14 Oct 2020 12:25:18 -0400 Subject: [PATCH] nvmf_rpc: remove a redundant '\n' For example: Got JSON-RPC error response response: { "code": -32602, "message": "Invalid transport type 'rdma'\n" } The \n here is redundant. Change-Id: I30a22f93f2be2550fdbe2af2d90eaa1c381dc7ae Signed-off-by: wanghailiangx Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4655 Tested-by: SPDK CI Jenkins Community-CI: Broadcom CI Reviewed-by: Changpeng Liu Reviewed-by: Tomasz Zawadzki --- lib/nvmf/nvmf_rpc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/nvmf/nvmf_rpc.c b/lib/nvmf/nvmf_rpc.c index 308e2990c..5a6142b1f 100644 --- a/lib/nvmf/nvmf_rpc.c +++ b/lib/nvmf/nvmf_rpc.c @@ -1924,7 +1924,7 @@ nvmf_rpc_tgt_add_transport_done(void *cb_arg, int status) if (status) { SPDK_ERRLOG("Failed to add transport to tgt.(%d)\n", status); spdk_jsonrpc_send_error_response_fmt(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR, - "Failed to add transport to tgt.(%d)\n", + "Failed to add transport to tgt.(%d)", status); return; } @@ -1971,7 +1971,7 @@ rpc_nvmf_create_transport(struct spdk_jsonrpc_request *request, if (spdk_nvme_transport_id_parse_trtype(&trtype, ctx->trtype)) { SPDK_ERRLOG("Invalid transport type '%s'\n", ctx->trtype); spdk_jsonrpc_send_error_response_fmt(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS, - "Invalid transport type '%s'\n", ctx->trtype); + "Invalid transport type '%s'", ctx->trtype); nvmf_rpc_create_transport_ctx_free(ctx); return; } @@ -1985,7 +1985,7 @@ rpc_nvmf_create_transport(struct spdk_jsonrpc_request *request, */ SPDK_ERRLOG("Invalid transport type '%s'\n", ctx->trtype); spdk_jsonrpc_send_error_response_fmt(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS, - "Invalid transport type '%s'\n", ctx->trtype); + "Invalid transport type '%s'", ctx->trtype); nvmf_rpc_create_transport_ctx_free(ctx); return; } @@ -2002,7 +2002,7 @@ rpc_nvmf_create_transport(struct spdk_jsonrpc_request *request, if (spdk_nvmf_tgt_get_transport(tgt, ctx->trtype)) { SPDK_ERRLOG("Transport type '%s' already exists\n", ctx->trtype); spdk_jsonrpc_send_error_response_fmt(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR, - "Transport type '%s' already exists\n", ctx->trtype); + "Transport type '%s' already exists", ctx->trtype); nvmf_rpc_create_transport_ctx_free(ctx); return; } @@ -2012,7 +2012,7 @@ rpc_nvmf_create_transport(struct spdk_jsonrpc_request *request, if (!transport) { SPDK_ERRLOG("Transport type '%s' create failed\n", ctx->trtype); spdk_jsonrpc_send_error_response_fmt(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR, - "Transport type '%s' create failed\n", ctx->trtype); + "Transport type '%s' create failed", ctx->trtype); nvmf_rpc_create_transport_ctx_free(ctx); return; }