Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Fri, 21 Apr 2006 11:02:06 +0200 | From | Nick Piggin <> | Subject | Re: [patch] mm: introduce remap_vmalloc_range (pls. drop previous patchset) |
| |
On Fri, Apr 21, 2006 at 11:57:32AM +0300, Pekka Enberg wrote: > 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
So he did...
--- Index: linux-2.6/mm/vmalloc.c =================================================================== --- linux-2.6.orig/mm/vmalloc.c +++ linux-2.6/mm/vmalloc.c @@ -725,7 +725,7 @@ int remap_vmalloc_range(struct vm_area_s goto out_einval_locked; read_unlock(&vmlist_lock); - addr = (void *)((unsigned long)addr + (pgoff << PAGE_SHIFT)); + addr += pgoff << PAGE_SHIFT; do { struct page *page = vmalloc_to_page(addr); ret = vm_insert_page(vma, uaddr, page); @@ -733,7 +733,7 @@ int remap_vmalloc_range(struct vm_area_s return ret; uaddr += PAGE_SIZE; - addr = (void *)((unsigned long)addr+PAGE_SIZE); + addr += PAGE_SIZE; usize -= PAGE_SIZE; } while (usize > 0); - 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/
| ![\](/images/icornerr.gif) |