staging: lustre: osc: remove unused variable

Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>

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/osc/lproc_osc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
 
diff --git a/drivers/staging/lustre/lustre/osc/lproc_osc.c b/drivers/staging/lustre/lustre/osc/lproc_osc.c
index 1795d3a..3ef2b55 100644
--- a/drivers/staging/lustre/lustre/osc/lproc_osc.c
+++ b/drivers/staging/lustre/lustre/osc/lproc_osc.c
@@ -164,16 +164,13 @@ static int osc_cached_mb_seq_show(struct seq_file *m, void *v)
 	struct obd_device *dev = m->private;
 	struct client_obd *cli = &dev->u.cli;
 	int shift = 20 - PAGE_CACHE_SHIFT;
-	int rc;
 
-	rc = seq_printf(m,
+	return seq_printf(m,
 		      "used_mb: %d\n"
 		      "busy_cnt: %d\n",
 		      (atomic_read(&cli->cl_lru_in_list) +
 			atomic_read(&cli->cl_lru_busy)) >> shift,
 		      atomic_read(&cli->cl_lru_busy));
-
-	return rc;
 }
 
 /* shrink the number of caching pages to a specific number */
BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.