From e867919757d716bfbff93556f45a1d779b6b5f36 Mon Sep 17 00:00:00 2001 From: Aya Mahfouz Date: Fri, 27 Feb 2015 14:55:16 +0200 Subject: [PATCH] staging: lustre: ptlrpc: remove unused variable This patch removes a variable that was simply used to store the return value of a function call before returning it. The issue was detected and resolved using the following coccinelle script: @@ identifier len,f; @@ -int len; ... when != len when strict -len = +return f(...); -return len; Signed-off-by: Aya Mahfouz Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/ptlrpc/nrs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/ptlrpc/nrs.c b/drivers/staging/lustre/lustre/ptlrpc/nrs.c index d5fd7215c72f..371af9c7ba89 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/nrs.c +++ b/drivers/staging/lustre/lustre/ptlrpc/nrs.c @@ -912,7 +912,6 @@ static int nrs_register_policies_locked(struct ptlrpc_nrs *nrs) static int nrs_svcpt_setup_locked0(struct ptlrpc_nrs *nrs, struct ptlrpc_service_part *svcpt) { - int rc; enum ptlrpc_nrs_queue_type queue; LASSERT(mutex_is_locked(&nrs_core.nrs_mutex)); @@ -930,9 +929,7 @@ static int nrs_svcpt_setup_locked0(struct ptlrpc_nrs *nrs, INIT_LIST_HEAD(&nrs->nrs_policy_list); INIT_LIST_HEAD(&nrs->nrs_policy_queued); - rc = nrs_register_policies_locked(nrs); - - return rc; + return nrs_register_policies_locked(nrs); } /** -- 2.30.2