linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jinpu Wang <jinpu.wang@ionos.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: RDMA mailing list <linux-rdma@vger.kernel.org>,
	Bart Van Assche <bvanassche@acm.org>,
	Leon Romanovsky <leon@kernel.org>,
	Doug Ledford <dledford@redhat.com>,
	Haris Iqbal <haris.iqbal@ionos.com>,
	Gioh Kim <gi-oh.kim@ionos.com>
Subject: Re: [PATCH] RDMA/rtrs: Avoid Wtautological-constant-out-of-range-compare
Date: Tue, 1 Jun 2021 07:02:45 +0200	[thread overview]
Message-ID: <CAMGffEni4N-jF+mH1fysVRgJreYxvSDSfpAhrNvWGnoA_5qKdA@mail.gmail.com> (raw)
In-Reply-To: <20210531184331.GL1096940@ziepe.ca>

On Mon, May 31, 2021 at 8:43 PM Jason Gunthorpe <jgg@ziepe.ca> wrote:
>
> On Mon, May 31, 2021 at 02:28:35PM +0200, Jack Wang wrote:
> > drivers/infiniband/ulp/rtrs/rtrs-clt.c:1786:19: warning: result of comparison of
> > constant 'MAX_SESS_QUEUE_DEPTH' (65536) with expression of type 'u16'
> > (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare]
> >
> > To fix it, limit MAX_SESS_QUEUE_DEPTH to u16 max, which is 65535, and
> > drop the check in rtrs-clt, as it's the type u16 max.
> >
> > Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
> > ---
> >  drivers/infiniband/ulp/rtrs/rtrs-clt.c | 5 -----
> >  drivers/infiniband/ulp/rtrs/rtrs-pri.h | 4 ++--
> >  2 files changed, 2 insertions(+), 7 deletions(-)
>
> I kept the patch as is since the first hunk gets wonky conflicts if it
> is squashed
>
> Jason
Thanks!

      reply	other threads:[~2021-06-01  5:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-31 12:28 [PATCH] RDMA/rtrs: Avoid Wtautological-constant-out-of-range-compare Jack Wang
2021-05-31 18:43 ` Jason Gunthorpe
2021-06-01  5:02   ` Jinpu Wang [this message]

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=CAMGffEni4N-jF+mH1fysVRgJreYxvSDSfpAhrNvWGnoA_5qKdA@mail.gmail.com \
    --to=jinpu.wang@ionos.com \
    --cc=bvanassche@acm.org \
    --cc=dledford@redhat.com \
    --cc=gi-oh.kim@ionos.com \
    --cc=haris.iqbal@ionos.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /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).