ocfs2: remove redundant assignment to variable status
authorColin Ian King <colin.i.king@gmail.com>
Tue, 23 Apr 2024 22:30:18 +0000 (23:30 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 8 May 2024 15:41:27 +0000 (08:41 -0700)
Variable status is being assigned and error code that is never read, it is
being assigned inside of a do-while loop.  The assignment is redundant and
can be removed.

Cleans up clang scan build warning:
fs/ocfs2/dlm/dlmdomain.c:1530:2: warning: Value stored to 'status' is never
read [deadcode.DeadStores]

Link: https://lkml.kernel.org/r/20240423223018.1573213-1-colin.i.king@gmail.com
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Acked-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>
Cc: Heming Zhao <heming.zhao@suse.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/dlm/dlmdomain.c

index 2e0a2f3382829cd63753002ede966df557c6591a..2018501b2249373fc8ecb7070b82164dc9c036e1 100644 (file)
@@ -1527,7 +1527,6 @@ static void dlm_send_join_asserts(struct dlm_ctxt *dlm,
 {
        int status, node, live;
 
-       status = 0;
        node = -1;
        while ((node = find_next_bit(node_map, O2NM_MAX_NODES,
                                     node + 1)) < O2NM_MAX_NODES) {