[openib-general] [PATCH applied] sdp: replace mlock with get_user_pages
Michael S. Tsirkin
mst at mellanox.co.il
Wed Aug 10 00:31:00 PDT 2005
Quoting r. Hal Rosenstock <halr at voltaire.com>:
> Subject: Re: [openib-general] [PATCH applied] sdp: replace mlock with get_user_pages
>
> On Tue, 2005-08-09 at 09:22, Michael S. Tsirkin wrote:
> > +static void sdp_copy_one_page(struct page *from, struct page* to,
> > + unsigned long iocb_addr, size_t iocb_size,
> > + unsigned long uaddr)
> > +{
> > + size_t size_left = iocb_addr + iocb_size - uaddr;
> > + size_t size = min(size_left,PAGE_SIZE);
>
> The last line results in the following warning on x86:
> drivers/infiniband/ulp/sdp/sdp_iocb.c: In function `sdp_copy_one_page':
> drivers/infiniband/ulp/sdp/sdp_iocb.c:46: warning: comparison of distinct pointer types lacks a cast
>
> -- Hal
>
Here's a fix. Applied. Thanks!
---
x86: warning: comparison of distinct pointer types lacks a cast
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
Index: ulp/sdp/sdp_iocb.c
===================================================================
--- ulp/sdp/sdp_iocb.c (revision 3036)
+++ ulp/sdp/sdp_iocb.c (working copy)
@@ -43,7 +43,7 @@ static void sdp_copy_one_page(struct pag
unsigned long uaddr)
{
size_t size_left = iocb_addr + iocb_size - uaddr;
- size_t size = min(size_left,PAGE_SIZE);
+ size_t size = min(size_left, (size_t)PAGE_SIZE);
unsigned long offset = uaddr % PAGE_SIZE;
unsigned long flags;
--
MST
More information about the general
mailing list