xen/gnttab: Reduce code volume when using union grant_combo
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 21 Nov 2018 18:38:41 +0000 (18:38 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 28 Jun 2019 12:17:53 +0000 (13:17 +0100)
commitc097c46a73cb33ef830c572f0824af35fd2327db
tree2f3722d50e3d75f777c38e00d537908976c536ba
parent8dc0b31dc471b6dd45b58a3df225c07b6c08da5f
xen/gnttab: Reduce code volume when using union grant_combo

There is no need for 'struct { ... } shorts' to be named.  Convert it to being
an anonymous struct, and rename 'word' to the more common 'raw'.

For _set_status_v1() and gnttab_prepare_for_transfer() which use a bounded
cmpxchg loop, rename {prev,new}_scombo to {prev,new} and reduce their scope to
within the loop.

For _set_status_v2(), the flags and id variables are completely unnecessary.
Drop them.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/grant_table.c