All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH next] siw: Fix pointer-to-int-cast warning in siw_rx_pbl()
@ 2020-06-10 17:47 Tom Seewald
  2020-06-10 17:50 ` Jason Gunthorpe
  2020-06-16 14:03 ` Jason Gunthorpe
  0 siblings, 2 replies; 11+ messages in thread
From: Tom Seewald @ 2020-06-10 17:47 UTC (permalink / raw)
  To: linux-rdma; +Cc: tseewald, Bernard Metzler, Doug Ledford, Jason Gunthorpe

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.

Signed-off-by: Tom Seewald <tseewald@gmail.com>
---
 drivers/infiniband/sw/siw/siw_qp_rx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/sw/siw/siw_qp_rx.c b/drivers/infiniband/sw/siw/siw_qp_rx.c
index 650520244ed0..7271d705f4b0 100644
--- a/drivers/infiniband/sw/siw/siw_qp_rx.c
+++ b/drivers/infiniband/sw/siw/siw_qp_rx.c
@@ -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;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-06-16 14:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-10 17:47 [PATCH next] siw: Fix pointer-to-int-cast warning in siw_rx_pbl() Tom Seewald
2020-06-10 17:50 ` Jason Gunthorpe
2020-06-10 18:21   ` Tom Seewald
2020-06-11 10:21   ` Bernard Metzler
2020-06-11 11:35     ` Jason Gunthorpe
2020-06-11 14:11       ` Bernard Metzler
2020-06-11 14:23         ` Jason Gunthorpe
2020-06-11 15:06           ` Bernard Metzler
2020-06-11 17:05             ` Jason Gunthorpe
2020-06-12 15:56               ` Bernard Metzler
2020-06-16 14:03 ` Jason Gunthorpe

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.