linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "yangx.jy@fujitsu.com" <yangx.jy@fujitsu.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"rpearsonhpe@gmail.com" <rpearsonhpe@gmail.com>,
	"zyjzyj2000@gmail.com" <zyjzyj2000@gmail.com>,
	"leon@kernel.org" <leon@kernel.org>
Subject: Re: [PATCH v2 3/5] RDMA/rxe: Change the is_user member of struct rxe_cq to bool
Date: Thu, 16 Sep 2021 09:17:08 +0000	[thread overview]
Message-ID: <61430B7C.8000907@fujitsu.com> (raw)
In-Reply-To: <20210914183355.GA136464@nvidia.com>

On 2021/9/15 2:33, Jason Gunthorpe wrote:
> On Thu, Sep 02, 2021 at 04:46:38PM +0800, Xiao Yang wrote:
>> Make all is_user members of struct rxe_sq/rxe_cq/rxe_srq/rxe_cq
>> has the same type.
>>
>> Signed-off-by: Xiao Yang<yangx.jy@fujitsu.com>
>>   drivers/infiniband/sw/rxe/rxe_cq.c    | 3 +--
>>   drivers/infiniband/sw/rxe/rxe_verbs.h | 2 +-
>>   2 files changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/infiniband/sw/rxe/rxe_cq.c b/drivers/infiniband/sw/rxe/rxe_cq.c
>> index aef288f164fd..fd655e41d621 100644
>> +++ b/drivers/infiniband/sw/rxe/rxe_cq.c
>> @@ -81,8 +81,7 @@ int rxe_cq_from_init(struct rxe_dev *rxe, struct rxe_cq *cq, int cqe,
>>   		return err;
>>   	}
>>
>> -	if (uresp)
>> -		cq->is_user = 1;
>> +	cq->is_user = uresp ? true : false;
> When you resend this series we don't need any of the ternary
> expressions, when things implicitly cast to bool they are converted to
> 1/0 using the same logic as any other boolean expression. So just
> write
>
> cq->is_user = uresp;
Hi Jason,

Thanks for your suggestion.
I will update it in the next version.

Best Regards,
Xiao Yang
> Jason

  reply	other threads:[~2021-09-16  9:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-02  8:46 [PATCH v2 0/5] RDMA/rxe: Do some cleanup Xiao Yang
2021-09-02  8:46 ` [PATCH v2 1/5] RDMA/rxe: Remove unnecessary check for qp->is_user/cq->is_user Xiao Yang
2021-09-14 18:32   ` Jason Gunthorpe
2021-09-16  9:16     ` yangx.jy
2021-09-16 13:22       ` Jason Gunthorpe
2021-09-17  6:00         ` yangx.jy
2021-09-02  8:46 ` [PATCH v2 2/5] RDMA/rxe: Remove the common is_user member of struct rxe_qp Xiao Yang
2021-09-02  8:46 ` [PATCH v2 3/5] RDMA/rxe: Change the is_user member of struct rxe_cq to bool Xiao Yang
2021-09-14 18:33   ` Jason Gunthorpe
2021-09-16  9:17     ` yangx.jy [this message]
2021-09-02  8:46 ` [PATCH v2 4/5] RDMA/rxe: Set partial attributes when completion status != IBV_WC_SUCCESS Xiao Yang
2021-09-02  8:46 ` [PATCH v2 5/5] RDMA/rxe: Remove duplicate settings Xiao Yang

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=61430B7C.8000907@fujitsu.com \
    --to=yangx.jy@fujitsu.com \
    --cc=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=rpearsonhpe@gmail.com \
    --cc=zyjzyj2000@gmail.com \
    --subject='Re: [PATCH v2 3/5] RDMA/rxe: Change the is_user member of struct rxe_cq to bool' \
    /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

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).