From: Leon Romanovsky <leon@kernel.org>
To: Doug Ledford <dledford@redhat.com>, Jason Gunthorpe <jgg@nvidia.com>
Cc: Leon Romanovsky <leonro@nvidia.com>, linux-rdma@vger.kernel.org
Subject: [PATCH rdma-next] RDMA/umem: Silence build warning on i386 architecture
Date: Wed, 6 Jan 2021 14:20:47 +0200 [thread overview]
Message-ID: <20210106122047.498453-1-leon@kernel.org> (raw)
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)'
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
drivers/infiniband/core/umem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
index 313fabb9f4a2..95be8cc75d2e 100644
--- a/drivers/infiniband/core/umem.c
+++ b/drivers/infiniband/core/umem.c
@@ -202,7 +202,7 @@ static struct ib_umem *__ib_umem_get(struct ib_device *device,
}
npages = ib_umem_num_pages(umem);
- if (npages == 0 || npages > UINT_MAX) {
+ if (npages == 0 || npages >= UINT_MAX) {
ret = -EINVAL;
goto out;
}
--
2.29.2
next reply other threads:[~2021-01-06 12:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-06 12:20 Leon Romanovsky [this message]
2021-01-08 20:28 ` [PATCH rdma-next] RDMA/umem: Silence build warning on i386 architecture Jason Gunthorpe
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=20210106122047.498453-1-leon@kernel.org \
--to=leon@kernel.org \
--cc=dledford@redhat.com \
--cc=jgg@nvidia.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox