lkml.org 
[lkml]   [2018]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/3] staging: erofs: unzip_vle.c: Constant in comparison on right side
From
Date


On 2018/11/13 4:43, Cristian Sicilia wrote:
> 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>

Thanks,
Gao Xiang

> ---
> drivers/staging/erofs/unzip_vle.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c
> index 1ffeeaa..35add4e 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 @@ static inline bool try_to_claim_workgroup(
> * 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;
>

\
 
 \ /
  Last update: 2018-11-13 01:03    [W:0.141 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site