|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v6 2/3] ioreq: Indent ioreq_server_alloc_mfn() body one level deeper
No functional change. It adds a wrapping block to prepare for the loop
that the subsequent patch introduces to handle multiple ioreq pages.
Signed-off-by: Julian Vetter <julian.vetter@xxxxxxxxxx>
---
Changes in v6:
- Dropped the indentation change for ioreq_server_free_mfn, because the
modifications in the next patch don't really merit the change anymore
---
xen/common/ioreq.c | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/xen/common/ioreq.c b/xen/common/ioreq.c
index d8d02167b4..bae9b99c99 100644
--- a/xen/common/ioreq.c
+++ b/xen/common/ioreq.c
@@ -277,22 +277,24 @@ static int ioreq_server_alloc_mfn(struct ioreq_server *s,
bool buf)
return 0;
}
- page = alloc_domheap_page(s->target, MEMF_no_refcount);
+ {
+ page = alloc_domheap_page(s->target, MEMF_no_refcount);
- if ( !page )
- return -ENOMEM;
+ if ( !page )
+ return -ENOMEM;
- if ( !get_page_and_type(page, s->target, PGT_writable_page) )
- {
- /*
- * The domain can't possibly know about this page yet, so failure
- * here is a clear indication of something fishy going on.
- */
- domain_crash(s->emulator);
- return -ENODATA;
- }
+ if ( !get_page_and_type(page, s->target, PGT_writable_page) )
+ {
+ /*
+ * The domain can't possibly know about this page yet, so failure
+ * here is a clear indication of something fishy going on.
+ */
+ domain_crash(s->emulator);
+ return -ENODATA;
+ }
- mfn = page_to_mfn(page);
+ mfn = page_to_mfn(page);
+ }
iorp->va = vmap(&mfn, 1);
if ( !iorp->va )
goto fail;
--
2.53.0
--
Julian Vetter | Vates Hypervisor & Kernel Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |