ia64/xen-unstable

changeset 8072:b05e1c4bc31b

Clean the arch_memory_op() for-loop header.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sat Nov 26 10:43:27 2005 +0100 (2005-11-26)
parents 5d95ab80f290
children 001ba14fbb1b
files xen/arch/x86/x86_64/mm.c
line diff
     1.1 --- a/xen/arch/x86/x86_64/mm.c	Sat Nov 26 10:24:08 2005 +0100
     1.2 +++ b/xen/arch/x86/x86_64/mm.c	Sat Nov 26 10:43:27 2005 +0100
     1.3 @@ -190,7 +190,8 @@ long arch_memory_op(int op, void *arg)
     1.4          if ( copy_from_user(&xmml, arg, sizeof(xmml)) )
     1.5              return -EFAULT;
     1.6  
     1.7 -        for ( i = 0, v = RDWR_MPT_VIRT_START; v != RDWR_MPT_VIRT_END; 
     1.8 +        for ( i = 0, v = RDWR_MPT_VIRT_START;
     1.9 +              (i != xmml.max_extents) && (v != RDWR_MPT_VIRT_END);
    1.10                i++, v += 1 << 21 )
    1.11          {
    1.12              l3e = l4e_to_l3e(idle_pg_table[l4_table_offset(v)])[
    1.13 @@ -201,8 +202,6 @@ long arch_memory_op(int op, void *arg)
    1.14              if ( !(l2e_get_flags(l2e) & _PAGE_PRESENT) )
    1.15                  break;
    1.16              mfn = l2e_get_pfn(l2e) + l1_table_offset(v);
    1.17 -            if ( i == xmml.max_extents )
    1.18 -                break;
    1.19              if ( put_user(mfn, &xmml.extent_start[i]) )
    1.20                  return -EFAULT;
    1.21          }