From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>,
Leon Romanovsky <leonro@nvidia.com>, <linux-rdma@vger.kernel.org>
Subject: Re: [PATCH rdma-next] RDMA/umem: Silence build warning on i386 architecture
Date: Fri, 8 Jan 2021 16:28:31 -0400 [thread overview]
Message-ID: <20210108202831.GA1042005@nvidia.com> (raw)
In-Reply-To: <20210106122047.498453-1-leon@kernel.org>
On Wed, Jan 06, 2021 at 02:20:47PM +0200, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
>
> Sacrifice one page in order to silence compilation failure on i386
> architecture.
>
> drivers/infiniband/core/umem.c:205 __ib_umem_get() warn: impossible
> condition '(npages > (~0)) => (0-u32max > u32max)'
I think I prefer to just leave this warning on 32 bit builds.. 32 bit
inherently can't have this overflow so yes the condition should be
impossible
Using >= is just confusing
If you really want to fix it then npages and every place that touches
it should be made size_t or unsigned long.
This includes __sg_alloc_table_from_pages, which doesn't look so bad
actually..
Jason
next prev parent reply other threads:[~2021-01-08 20:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-06 12:20 [PATCH rdma-next] RDMA/umem: Silence build warning on i386 architecture Leon Romanovsky
2021-01-08 20:28 ` Jason Gunthorpe [this message]
2021-01-11 6:41 ` Leon Romanovsky
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=20210108202831.GA1042005@nvidia.com \
--to=jgg@nvidia.com \
--cc=dledford@redhat.com \
--cc=leon@kernel.org \
--cc=leonro@nvidia.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.