From: "Jan Beulich" Subject: [PATCH] x86: minor cleanup to arch_memory_op() Date: Tue, 12 Jan 2010 11:09:27 +0000 Message-ID: <4B4C6677020000780002958F@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part406A4A77.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part406A4A77.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline There's a function-wide variable rc, so no need to re-declare it in individual case handling blocks. Signed-off-by: Jan Beulich --- 2010-01-06.orig/xen/arch/x86/mm.c 2010-01-06 11:23:46.000000000 = +0100 +++ 2010-01-06/xen/arch/x86/mm.c 2010-01-12 12:03:44.000000000 = +0100 @@ -4237,7 +4237,6 @@ long arch_memory_op(int op, XEN_GUEST_HA struct xen_add_to_physmap xatp; unsigned long prev_mfn, mfn =3D 0, gpfn; struct domain *d; - int rc; =20 if ( copy_from_guest(&xatp, arg, 1) ) return -EFAULT; @@ -4349,7 +4348,6 @@ long arch_memory_op(int op, XEN_GUEST_HA { struct xen_foreign_memory_map fmap; struct domain *d; - int rc; =20 if ( copy_from_guest(&fmap, arg, 1) ) return -EFAULT; @@ -4401,7 +4399,6 @@ long arch_memory_op(int op, XEN_GUEST_HA struct memory_map_context ctxt; XEN_GUEST_HANDLE(e820entry_t) buffer; unsigned int i; - int rc; =20 if ( !IS_PRIV(current->domain) ) return -EINVAL; --=__Part406A4A77.0__= Content-Type: text/plain; name="xen-x86-memory-op-cleanup.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="xen-x86-memory-op-cleanup.patch" There's a function-wide variable rc, so no need to re-declare it in=0Aindiv= idual case handling blocks.=0A=0ASigned-off-by: Jan Beulich =0A=0A--- 2010-01-06.orig/xen/arch/x86/mm.c 2010-01-06 = 11:23:46.000000000 +0100=0A+++ 2010-01-06/xen/arch/x86/mm.c 2010-01-12 = 12:03:44.000000000 +0100=0A@@ -4237,7 +4237,6 @@ long arch_memory_op(int = op, XEN_GUEST_HA=0A struct xen_add_to_physmap xatp;=0A = unsigned long prev_mfn, mfn =3D 0, gpfn;=0A struct domain *d;=0A- = int rc;=0A =0A if ( copy_from_guest(&xatp, arg, 1) )=0A = return -EFAULT;=0A@@ -4349,7 +4348,6 @@ long arch_memory_op(int op, = XEN_GUEST_HA=0A {=0A struct xen_foreign_memory_map fmap;=0A = struct domain *d;=0A- int rc;=0A =0A if ( copy_from_gue= st(&fmap, arg, 1) )=0A return -EFAULT;=0A@@ -4401,7 +4399,6 @@ = long arch_memory_op(int op, XEN_GUEST_HA=0A struct memory_map_conte= xt ctxt;=0A XEN_GUEST_HANDLE(e820entry_t) buffer;=0A = unsigned int i;=0A- int rc;=0A =0A if ( !IS_PRIV(current->do= main) )=0A return -EINVAL;=0A --=__Part406A4A77.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__Part406A4A77.0__=--