mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
RDMA/siw: Fix pointer-to-int-cast warning in siw_rx_pbl()
The variable buf_addr is type dma_addr_t, which may not be the same size
as a pointer. To ensure it is the correct size, cast to a uintptr_t.
Fixes: c536277e0d
("RDMA/siw: Fix 64/32bit pointer inconsistency")
Link: https://lore.kernel.org/r/20200610174717.15932-1-tseewald@gmail.com
Signed-off-by: Tom Seewald <tseewald@gmail.com>
Reviewed-by: Bernard Metzler <bmt@zurich.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
0dc63bbee0
commit
6769b275a3
1 changed files with 2 additions and 1 deletions
|
@ -139,7 +139,8 @@ static int siw_rx_pbl(struct siw_rx_stream *srx, int *pbl_idx,
|
|||
break;
|
||||
|
||||
bytes = min(bytes, len);
|
||||
if (siw_rx_kva(srx, (void *)buf_addr, bytes) == bytes) {
|
||||
if (siw_rx_kva(srx, (void *)(uintptr_t)buf_addr, bytes) ==
|
||||
bytes) {
|
||||
copied += bytes;
|
||||
offset += bytes;
|
||||
len -= bytes;
|
||||
|
|
Loading…
Add table
Reference in a new issue