[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v2] xen/arm: p2m_set_entry reuse mask variables
Reuse mask variables on order shift duplicated calculation. Signed-off-by: Paran Lee <p4ranlee@xxxxxxxxx> --- xen/arch/arm/p2m.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 1d1059f7d2..cdb3b56aa1 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -1118,11 +1118,12 @@ int p2m_set_entry(struct p2m_domain *p2m, if ( rc ) break; - sgfn = gfn_add(sgfn, (1 << order)); + mask = 1UL << order; + sgfn = gfn_add(sgfn, mask); if ( !mfn_eq(smfn, INVALID_MFN) ) - smfn = mfn_add(smfn, (1 << order)); + smfn = mfn_add(smfn, mask); - nr -= (1 << order); + nr -= mask; } return rc; -- 2.25.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |