guestcopy: evaluate {,__}copy{,_field}_to_guest*() ptr argument just once
authorJan Beulich <jbeulich@suse.com>
Mon, 27 Apr 2020 07:30:16 +0000 (09:30 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 27 Apr 2020 07:30:16 +0000 (09:30 +0200)
commitd0ee8e9ca4d4163e42dcd5f1cf13e4fae30a4190
treeaf09ae0987f21cdb97be0a82f8f649d52ee7133e
parent4bdf6b5a7fec876e9bbd70ebe605828ad0fb12a4
guestcopy: evaluate {,__}copy{,_field}_to_guest*() ptr argument just once

There's nothing wrong with having e.g.

    copy_to_guest(uarg, ptr++, 1);

yet until now this would increment "ptr" twice.

Also drop a pair of unneeded parentheses from every instance at this
occasion.

Fixes: b7954cc59831 ("Enhance guest memory accessor macros so that source operands can be")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
xen/include/asm-arm/guest_access.h
xen/include/asm-x86/guest_access.h