]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
ocfs2/dlm: remove unnecessary parentheses
authorNathan Chancellor <natechancellor@gmail.com>
Fri, 26 Oct 2018 22:02:41 +0000 (15:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Oct 2018 23:25:18 +0000 (16:25 -0700)
Clang warns when more than one set of parentheses is used for a
single conditional statement:

fs/ocfs2/dlm/dlmthread.c:534:18: warning: equality comparison with extraneous
      parentheses [-Wparentheses-equality]
        if ((res->owner == dlm->node_num)) {
             ~~~~~~~~~~~^~~~~~~~~~~~~~~~
fs/ocfs2/dlm/dlmthread.c:534:18: note: remove extraneous parentheses around the
      comparison to silence this warning
        if ((res->owner == dlm->node_num)) {
            ~           ^               ~

Link: http://lkml.kernel.org/r/20180924181929.6853-1-natechancellor@gmail.com
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/dlm/dlmthread.c

index 838a06d4066a6e36d820a1350d45b7656a26f31f..074d5de17bb26b84ac8a0c5cc5c8f010d19af8b6 100644 (file)
@@ -531,7 +531,7 @@ void __dlm_dirty_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res)
        assert_spin_locked(&res->spinlock);
 
        /* don't shuffle secondary queues */
-       if ((res->owner == dlm->node_num)) {
+       if (res->owner == dlm->node_num) {
                if (res->state & (DLM_LOCK_RES_MIGRATING |
                                  DLM_LOCK_RES_BLOCK_DIRTY))
                    return;