]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: lustre: lustre: osc: Remove variable that is not very useful.
authorHeena Sirwani <heenasirwani@gmail.com>
Tue, 7 Oct 2014 11:57:54 +0000 (17:27 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Oct 2014 02:29:10 +0000 (10:29 +0800)
The following patch removes a variable that is not very useful using
coccinelle.
The semantic patch used was:
@@
identifier ret;
@@

-int ret = 0;
 ... when != ret
     when strict
-return ret;
+return 0;

Signed-off-by: Heena Sirwani <heenasirwani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/osc/osc_cache.c

index 7734d666b7a176a94da8faf0c389e2306982c5ad..806fd397b7211daefcf80aec2241cdfe05597c45 100644 (file)
@@ -539,7 +539,6 @@ static int osc_extent_merge(const struct lu_env *env, struct osc_extent *cur,
 int osc_extent_release(const struct lu_env *env, struct osc_extent *ext)
 {
        struct osc_object *obj = ext->oe_obj;
-       int rc = 0;
 
        LASSERT(atomic_read(&ext->oe_users) > 0);
        LASSERT(sanity_check(ext) == 0);
@@ -571,7 +570,7 @@ int osc_extent_release(const struct lu_env *env, struct osc_extent *ext)
                osc_io_unplug_async(env, osc_cli(obj), obj);
        }
        osc_extent_put(env, ext);
-       return rc;
+       return 0;
 }
 
 static inline int overlapped(struct osc_extent *ex1, struct osc_extent *ex2)