linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gao Xiang <gaoxiang25@huawei.com>
To: Cristian Sicilia <sicilia.cristian@gmail.com>,
	Chao Yu <yuchao0@huawei.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	<linux-erofs@lists.ozlabs.org>
Cc: <devel@driverdev.osuosl.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] staging: erofs: unzip_vle.c: Constant in comparison on right side
Date: Tue, 13 Nov 2018 08:02:40 +0800	[thread overview]
Message-ID: <8e50cc41-5204-c64c-9b63-964e16334622@huawei.com> (raw)
In-Reply-To: <1542055439-24444-3-git-send-email-sicilia.cristian@gmail.com>



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;
> 

  reply	other threads:[~2018-11-13  0:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12 20:43 [PATCH 0/3] Clean up some syntax issue on unzip_vle.c Cristian Sicilia
2018-11-12 20:43 ` [PATCH 1/3] staging: erofs: unzip_vle.c: Replace comparison to NULL Cristian Sicilia
2018-11-12 22:46   ` Greg Kroah-Hartman
     [not found]     ` <CACU=YuX3U50uVaitV1Mhn3Dn8pXhPZt-1K7HX4Bn7MUCrgE35w@mail.gmail.com>
2018-11-12 23:46       ` Greg Kroah-Hartman
2018-11-13  0:38         ` Gao Xiang
2018-11-13  0:15   ` Gao Xiang
2018-11-16  3:07   ` Chao Yu
2018-11-12 20:43 ` [PATCH 2/3] staging: erofs: unzip_vle.c: Constant in comparison on right side Cristian Sicilia
2018-11-13  0:02   ` Gao Xiang [this message]
2018-11-16  3:07   ` Chao Yu
2018-11-12 20:43 ` [PATCH 3/3] staging: erofs: unzip_vle.c: Align parameter to the parentesis Cristian Sicilia
2018-11-13  0:00   ` Gao Xiang
2018-11-16  3:07   ` Chao Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8e50cc41-5204-c64c-9b63-964e16334622@huawei.com \
    --to=gaoxiang25@huawei.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sicilia.cristian@gmail.com \
    --cc=yuchao0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).