From: Tom Tucker <tom@opengridcomputing.com>
To: Bruce Fields <bfields@fieldses.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-nfs <linux-nfs@vger.kernel.org>
Subject: [PATCH] svcrdma: Fix compile warning on 32b platforms
Date: Fri, 23 May 2008 10:39:53 -0500 [thread overview]
Message-ID: <1211557193.4114.21.camel@trinity.ogc.int> (raw)
The ib_sge is used to store both dma_addr_t and virtual addresses.
This causes a warning on 32b platforms when casting ptrs to the
u64 addr field of the ib_sge. There is work underway to reduce the
memory footprint of the WR context in 2.6.27 the time frame that will
remove the overloading of the ib_sge.addr field.
Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
---
Thanks to Bruce and Andrew for pointing this out. I will compile-test both
32b and 64b platforms in the future.
net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 3 ++-
net/sunrpc/xprtrdma/svc_rdma_sendto.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
index 4da0d1d..dbab252 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
@@ -231,7 +231,8 @@ static void rdma_set_ctxt_sge(struct svcxprt_rdma *xprt,
atomic_inc(&xprt->sc_dma_used);
ctxt->sge[i].addr = (unsigned long)
ib_dma_map_single(xprt->sc_cm_id->device,
- (void*)sge[i].addr, sge[i].length,
+ (void*)(unsigned long)
+ sge[i].addr, sge[i].length,
DMA_FROM_DEVICE);
ctxt->sge[i].length = sge[i].length;
ctxt->sge[i].lkey = sge[i].lkey;
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
index cdb0732..eeee078 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
@@ -177,7 +177,7 @@ static int send_write(struct svcxprt_rdma *xprt, struct svc_rqst *rqstp,
atomic_inc(&xprt->sc_dma_used);
sge[sge_no].addr =
ib_dma_map_single(xprt->sc_cm_id->device,
- (void *)
+ (void *)(unsigned long)
xdr_sge[xdr_sge_no].addr + sge_off,
sge_bytes, DMA_TO_DEVICE);
if (dma_mapping_error(sge[sge_no].addr))
@@ -416,7 +416,7 @@ static int send_reply(struct svcxprt_rdma *rdma,
atomic_inc(&rdma->sc_dma_used);
ctxt->sge[sge_no].addr =
ib_dma_map_single(rdma->sc_cm_id->device,
- (void *)
+ (void *)(unsigned long)
ctxt->sge[sge_no].addr,
sge_bytes, DMA_TO_DEVICE);
}
next reply other threads:[~2008-05-23 15:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-23 15:39 Tom Tucker [this message]
[not found] ` <1211557193.4114.21.camel-SMNkleLxa3ZimH42XvhXlA@public.gmane.org>
2008-05-25 19:01 ` [PATCH] svcrdma: Fix compile warning on 32b platforms J. Bruce Fields
2008-05-25 20:21 ` J. Bruce Fields
[not found] ` <C45F878E.19918%tom@opengridcomputing.com>
2008-05-28 19:07 ` J. Bruce Fields
2008-05-28 19:49 ` Tom Tucker
2008-05-27 14:08 ` Tom Tucker
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=1211557193.4114.21.camel@trinity.ogc.int \
--to=tom@opengridcomputing.com \
--cc=akpm@linux-foundation.org \
--cc=bfields@fieldses.org \
--cc=linux-nfs@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