[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 3/8] gnttab: Remove unused-but-set variable
Function unmap_common_complete defines and sets a variable ld that is later on passed to a macro gnttab_host_mapping_get_page_type. On arm this macro does not make use of any arguments causing a compiler to warn about unused-but-set variable (when -Wunused-but-set-variable is enabled). Fix this by removing ld and directly passing current->domain to gnttab_host_mapping_get_page_type. Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx> --- xen/common/grant_table.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index febbe12eab..71b1107999 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -1556,7 +1556,7 @@ unmap_common( static void unmap_common_complete(struct gnttab_unmap_common *op) { - struct domain *ld, *rd = op->rd; + struct domain *rd = op->rd; struct grant_table *rgt; struct active_grant_entry *act; grant_entry_header_t *sha; @@ -1569,8 +1569,6 @@ unmap_common_complete(struct gnttab_unmap_common *op) return; } - ld = current->domain; - rcu_lock_domain(rd); rgt = rd->grant_table; @@ -1608,7 +1606,7 @@ unmap_common_complete(struct gnttab_unmap_common *op) if ( pg ) { if ( gnttab_host_mapping_get_page_type(op->done & GNTMAP_readonly, - ld, rd) ) + current->domain, rd) ) put_page_type(pg); put_page(pg); } -- 2.25.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |