summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCristian Sicilia <sicilia.cristian@gmail.com>2018-11-12 21:43:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-20 10:59:31 +0100
commitbc8098de78d19eafbc197c29e76d96eb9e831db8 (patch)
tree6e419062cc861cfa11a6287fc71f3d406008cce7
parent42d40b4ad840f9b4cfc9505e253a4d3cfd712e59 (diff)
staging: erofs: unzip_vle.c: Constant in comparison on right side
Comparisons should place the constant on the right side of the test. Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com> Reviewed-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/erofs/unzip_vle.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c
index 1ffeeaa6e976..35add4eb3057 100644
--- a/drivers/staging/erofs/unzip_vle.c
+++ b/drivers/staging/erofs/unzip_vle.c
@@ -250,8 +250,8 @@ static inline bool try_to_claim_workgroup(
retry:
if (grp->next == Z_EROFS_VLE_WORKGRP_NIL) {
/* type 1, nil workgroup */
- if (Z_EROFS_VLE_WORKGRP_NIL != cmpxchg(&grp->next,
- Z_EROFS_VLE_WORKGRP_NIL, *owned_head))
+ if (cmpxchg(&grp->next, Z_EROFS_VLE_WORKGRP_NIL,
+ *owned_head) != Z_EROFS_VLE_WORKGRP_NIL)
goto retry;
*owned_head = grp;
@@ -262,8 +262,8 @@ retry:
* be careful that its submission itself is governed
* by the original owned chain.
*/
- if (Z_EROFS_VLE_WORKGRP_TAIL != cmpxchg(&grp->next,
- Z_EROFS_VLE_WORKGRP_TAIL, *owned_head))
+ if (cmpxchg(&grp->next, Z_EROFS_VLE_WORKGRP_TAIL,
+ *owned_head) != Z_EROFS_VLE_WORKGRP_TAIL)
goto retry;
*owned_head = Z_EROFS_VLE_WORKGRP_TAIL;