lkml.org 
[lkml]   [2006]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] mm: introduce remap_vmalloc_range (pls. drop previous patchset)
Hi Nick,

On 4/21/06, Nick Piggin <npiggin@suse.de> wrote:
> + addr = (void *)((unsigned long)addr + (pgoff << PAGE_SHIFT));

As Andrew said, you can get rid of the casting with:

addr += pgoff << PAGE_SHIFT;

> + do {
> + struct page *page = vmalloc_to_page(addr);
> + ret = vm_insert_page(vma, uaddr, page);
> + if (ret)
> + return ret;
> +
> + uaddr += PAGE_SIZE;
> + addr = (void *)((unsigned long)addr+PAGE_SIZE);

Same here.

Pekka
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-21 11:00    [W:0.025 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site