diff options
author | Juergen Gross <jgross@suse.com> | 2014-11-28 05:53:50 -0500 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2014-12-04 09:08:29 -0500 |
commit | 6f58d89e6c71db99fc9b211f9ec2180f33304628 (patch) | |
tree | 180dd5a61d61a3552794aa279cdd17c25c8ef95b | |
parent | 14520c92cbd7619ae097a3087b140c992b5c270b (diff) |
xen: fix some style issues in p2m.c
The source arch/x86/xen/p2m.c has some coding style issues. Fix them.
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
-rw-r--r-- | arch/x86/xen/p2m.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index b456b048eca9..04814c629abf 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c | |||
@@ -922,7 +922,7 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops, | |||
922 | continue; | 922 | continue; |
923 | 923 | ||
924 | if (map_ops[i].flags & GNTMAP_contains_pte) { | 924 | if (map_ops[i].flags & GNTMAP_contains_pte) { |
925 | pte = (pte_t *) (mfn_to_virt(PFN_DOWN(map_ops[i].host_addr)) + | 925 | pte = (pte_t *)(mfn_to_virt(PFN_DOWN(map_ops[i].host_addr)) + |
926 | (map_ops[i].host_addr & ~PAGE_MASK)); | 926 | (map_ops[i].host_addr & ~PAGE_MASK)); |
927 | mfn = pte_mfn(*pte); | 927 | mfn = pte_mfn(*pte); |
928 | } else { | 928 | } else { |
@@ -970,7 +970,7 @@ int m2p_add_override(unsigned long mfn, struct page *page, | |||
970 | address = (unsigned long)__va(pfn << PAGE_SHIFT); | 970 | address = (unsigned long)__va(pfn << PAGE_SHIFT); |
971 | ptep = lookup_address(address, &level); | 971 | ptep = lookup_address(address, &level); |
972 | if (WARN(ptep == NULL || level != PG_LEVEL_4K, | 972 | if (WARN(ptep == NULL || level != PG_LEVEL_4K, |
973 | "m2p_add_override: pfn %lx not mapped", pfn)) | 973 | "m2p_add_override: pfn %lx not mapped", pfn)) |
974 | return -EINVAL; | 974 | return -EINVAL; |
975 | } | 975 | } |
976 | 976 | ||
@@ -1072,7 +1072,7 @@ int m2p_remove_override(struct page *page, | |||
1072 | ptep = lookup_address(address, &level); | 1072 | ptep = lookup_address(address, &level); |
1073 | 1073 | ||
1074 | if (WARN(ptep == NULL || level != PG_LEVEL_4K, | 1074 | if (WARN(ptep == NULL || level != PG_LEVEL_4K, |
1075 | "m2p_remove_override: pfn %lx not mapped", pfn)) | 1075 | "m2p_remove_override: pfn %lx not mapped", pfn)) |
1076 | return -EINVAL; | 1076 | return -EINVAL; |
1077 | } | 1077 | } |
1078 | 1078 | ||
@@ -1102,9 +1102,8 @@ int m2p_remove_override(struct page *page, | |||
1102 | * hypercall actually returned an error. | 1102 | * hypercall actually returned an error. |
1103 | */ | 1103 | */ |
1104 | if (kmap_op->handle == GNTST_general_error) { | 1104 | if (kmap_op->handle == GNTST_general_error) { |
1105 | printk(KERN_WARNING "m2p_remove_override: " | 1105 | pr_warn("m2p_remove_override: pfn %lx mfn %lx, failed to modify kernel mappings", |
1106 | "pfn %lx mfn %lx, failed to modify kernel mappings", | 1106 | pfn, mfn); |
1107 | pfn, mfn); | ||
1108 | put_balloon_scratch_page(); | 1107 | put_balloon_scratch_page(); |
1109 | return -1; | 1108 | return -1; |
1110 | } | 1109 | } |
@@ -1112,14 +1111,14 @@ int m2p_remove_override(struct page *page, | |||
1112 | xen_mc_batch(); | 1111 | xen_mc_batch(); |
1113 | 1112 | ||
1114 | mcs = __xen_mc_entry( | 1113 | mcs = __xen_mc_entry( |
1115 | sizeof(struct gnttab_unmap_and_replace)); | 1114 | sizeof(struct gnttab_unmap_and_replace)); |
1116 | unmap_op = mcs.args; | 1115 | unmap_op = mcs.args; |
1117 | unmap_op->host_addr = kmap_op->host_addr; | 1116 | unmap_op->host_addr = kmap_op->host_addr; |
1118 | unmap_op->new_addr = scratch_page_address; | 1117 | unmap_op->new_addr = scratch_page_address; |
1119 | unmap_op->handle = kmap_op->handle; | 1118 | unmap_op->handle = kmap_op->handle; |
1120 | 1119 | ||
1121 | MULTI_grant_table_op(mcs.mc, | 1120 | MULTI_grant_table_op(mcs.mc, |
1122 | GNTTABOP_unmap_and_replace, unmap_op, 1); | 1121 | GNTTABOP_unmap_and_replace, unmap_op, 1); |
1123 | 1122 | ||
1124 | mcs = __xen_mc_entry(0); | 1123 | mcs = __xen_mc_entry(0); |
1125 | MULTI_update_va_mapping(mcs.mc, scratch_page_address, | 1124 | MULTI_update_va_mapping(mcs.mc, scratch_page_address, |