提交 6769b275 编写于 作者: T Tom Seewald 提交者: Jason Gunthorpe

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: c536277e ("RDMA/siw: Fix 64/32bit pointer inconsistency")
Link: https://lore.kernel.org/r/20200610174717.15932-1-tseewald@gmail.comSigned-off-by: NTom Seewald <tseewald@gmail.com>
Reviewed-by: NBernard Metzler <bmt@zurich.ibm.com>
Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
上级 0dc63bbe
...@@ -139,7 +139,8 @@ static int siw_rx_pbl(struct siw_rx_stream *srx, int *pbl_idx, ...@@ -139,7 +139,8 @@ static int siw_rx_pbl(struct siw_rx_stream *srx, int *pbl_idx,
break; break;
bytes = min(bytes, len); 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; copied += bytes;
offset += bytes; offset += bytes;
len -= bytes; len -= bytes;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册