ia64/xen-unstable
changeset 15101:b2adb797900a
x86: replace some intpte_t * casts
Don't cast values when other (type safe) mechanisms are available to =
achieve the same effect.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Don't cast values when other (type safe) mechanisms are available to =
achieve the same effect.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author | kfraser@localhost.localdomain |
---|---|
date | Tue May 15 10:08:20 2007 +0100 (2007-05-15) |
parents | 05ea0d79a92f |
children | 807f374e720d |
files | xen/arch/x86/mm.c |
line diff
1.1 --- a/xen/arch/x86/mm.c Tue May 15 10:03:58 2007 +0100 1.2 +++ b/xen/arch/x86/mm.c Tue May 15 10:08:20 2007 +0100 1.3 @@ -1017,7 +1017,7 @@ static void pae_flush_pgd( 1.4 l3tab_ptr = &cache->table[cache->inuse_idx][idx]; 1.5 _ol3e = l3e_get_intpte(*l3tab_ptr); 1.6 _nl3e = l3e_get_intpte(nl3e); 1.7 - _pl3e = cmpxchg((intpte_t *)l3tab_ptr, _ol3e, _nl3e); 1.8 + _pl3e = cmpxchg(&l3e_get_intpte(*l3tab_ptr), _ol3e, _nl3e); 1.9 BUG_ON(_pl3e != _ol3e); 1.10 } 1.11 1.12 @@ -1316,7 +1316,7 @@ static inline int update_intpte(intpte_t 1.13 /* Macro that wraps the appropriate type-changes around update_intpte(). 1.14 * Arguments are: type, ptr, old, new, mfn, vcpu */ 1.15 #define UPDATE_ENTRY(_t,_p,_o,_n,_m,_v) \ 1.16 - update_intpte((intpte_t *)(_p), \ 1.17 + update_intpte(&_t ## e_get_intpte(*(_p)), \ 1.18 _t ## e_get_intpte(_o), _t ## e_get_intpte(_n), \ 1.19 (_m), (_v)) 1.20 1.21 @@ -2498,7 +2498,7 @@ static int create_grant_pte_mapping( 1.22 } 1.23 1.24 ol1e = *(l1_pgentry_t *)va; 1.25 - if ( !UPDATE_ENTRY(l1, va, ol1e, nl1e, mfn, v) ) 1.26 + if ( !UPDATE_ENTRY(l1, (l1_pgentry_t *)va, ol1e, nl1e, mfn, v) ) 1.27 { 1.28 put_page_type(page); 1.29 rc = GNTST_general_error; 1.30 @@ -3278,7 +3278,7 @@ static int ptwr_emulated_update( 1.31 intpte_t t = old; 1.32 ol1e = l1e_from_intpte(old); 1.33 1.34 - okay = paging_cmpxchg_guest_entry(v, (intpte_t *) pl1e, 1.35 + okay = paging_cmpxchg_guest_entry(v, &l1e_get_intpte(*pl1e), 1.36 &t, val, _mfn(mfn)); 1.37 okay = (okay && t == old); 1.38