x86/IRQ: reduce casting involved in guest action retrieval
authorJan Beulich <jbeulich@suse.com>
Fri, 4 Dec 2020 12:17:24 +0000 (13:17 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 4 Dec 2020 12:17:24 +0000 (13:17 +0100)
commita00b271677bfa6365cd0446e09a0f41017e166d3
tree2a38f95b41817b5f778cdcd4438069efef6895a9
parentbfc78f77d03cfc038921ca337cc22bc25e84a877
x86/IRQ: reduce casting involved in guest action retrieval

Introduce a helper function covering both the IRQ_GUEST check and the
cast involved in obtaining the (correctly typed) pointer. Where possible
add const and/or reduce variable scope.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wl@xen.org>
xen/arch/x86/irq.c