fs/ocfs2/dlmglue.c: unneeded variable: "status"
authorHariprasad Kelam <hariprasad.kelam@gmail.com>
Fri, 12 Jul 2019 03:53:16 +0000 (20:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 12 Jul 2019 18:05:41 +0000 (11:05 -0700)
fix below issue reported by coccicheck

  fs/ocfs2/dlmglue.c:4410:5-11: Unneeded variable: "status". Return "0" on line 4428

We can not change return type of ocfs2_downconvert_thread as its
registered as callback of kthread_create.

Link: http://lkml.kernel.org/r/20190702183237.GA13975@hari-Inspiron-1545
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Gang He <ghe@suse.com>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/dlmglue.c

index dc987f5..1420723 100644 (file)
@@ -4407,7 +4407,6 @@ static int ocfs2_downconvert_thread_should_wake(struct ocfs2_super *osb)
 
 static int ocfs2_downconvert_thread(void *arg)
 {
-       int status = 0;
        struct ocfs2_super *osb = arg;
 
        /* only quit once we've been asked to stop and there is no more
@@ -4425,7 +4424,7 @@ static int ocfs2_downconvert_thread(void *arg)
        }
 
        osb->dc_task = NULL;
-       return status;
+       return 0;
 }
 
 void ocfs2_wake_downconvert_thread(struct ocfs2_super *osb)