From owner-svn-src-all@FreeBSD.ORG Mon Mar 28 13:28:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60462106566C; Mon, 28 Mar 2011 13:28:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B3BA8FC0A; Mon, 28 Mar 2011 13:28:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2SDSNLe095738; Mon, 28 Mar 2011 13:28:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2SDSNdC095736; Mon, 28 Mar 2011 13:28:23 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103281328.p2SDSNdC095736@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 28 Mar 2011 13:28:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220102 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2011 13:28:23 -0000 Author: kib Date: Mon Mar 28 13:28:23 2011 New Revision: 220102 URL: http://svn.freebsd.org/changeset/base/220102 Log: Trim white spaces, adjust style. MFC after: 2 weeks Modified: head/sys/kern/subr_uio.c Modified: head/sys/kern/subr_uio.c ============================================================================== --- head/sys/kern/subr_uio.c Mon Mar 28 13:21:26 2011 (r220101) +++ head/sys/kern/subr_uio.c Mon Mar 28 13:28:23 2011 (r220102) @@ -468,24 +468,26 @@ cloneuio(struct uio *uiop) int copyout_map(struct thread *td, vm_offset_t *addr, size_t sz) { - struct vmspace *vms = td->td_proc->p_vmspace; + struct vmspace *vms; int error; vm_size_t size; - - /* + + vms = td->td_proc->p_vmspace; + + /* * Map somewhere after heap in process memory. */ PROC_LOCK(td->td_proc); - *addr = round_page((vm_offset_t)vms->vm_daddr + + *addr = round_page((vm_offset_t)vms->vm_daddr + lim_max(td->td_proc, RLIMIT_DATA)); PROC_UNLOCK(td->td_proc); /* round size up to page boundry */ - size = (vm_size_t) round_page(sz); - - error = vm_mmap(&vms->vm_map, addr, size, PROT_READ | PROT_WRITE, + size = (vm_size_t)round_page(sz); + + error = vm_mmap(&vms->vm_map, addr, size, PROT_READ | PROT_WRITE, VM_PROT_ALL, MAP_PRIVATE | MAP_ANON, OBJT_DEFAULT, NULL, 0); - + return (error); } @@ -497,12 +499,12 @@ copyout_unmap(struct thread *td, vm_offs { vm_map_t map; vm_size_t size; - + if (sz == 0) return (0); map = &td->td_proc->p_vmspace->vm_map; - size = (vm_size_t) round_page(sz); + size = (vm_size_t)round_page(sz); if (!vm_map_remove(map, addr, addr + size)) return (EINVAL);