Patchwork [v2,1/3] xen: simplify xen_enabled

login
register
mail settings
Submitter Stefano Stabellini
Date May 29, 2013, 11:34 a.m.
Message ID <1369827271-20921-1-git-send-email-stefano.stabellini@eu.citrix.com>
Download mbox | patch
Permalink /patch/247251/
State New
Headers show

Comments

Stefano Stabellini - May 29, 2013, 11:34 a.m.
No need for preprocessor conditionals in xen_enabled: xen_allowed is
always defined.

Please backport this patch to stable branches (it is needed by the
following patch to remove the dependency on a preprocessor identifier
defined by config-target.h).

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CC: qemu-stable@nongnu.org
---
 include/hw/xen/xen.h |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

Patch

diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
index 7451c5a..b42b0fd 100644
--- a/include/hw/xen/xen.h
+++ b/include/hw/xen/xen.h
@@ -25,11 +25,7 @@  extern bool xen_allowed;
 
 static inline bool xen_enabled(void)
 {
-#if defined(CONFIG_XEN_BACKEND) && defined(CONFIG_XEN)
     return xen_allowed;
-#else
-    return 0;
-#endif
 }
 
 int xen_pci_slot_get_pirq(PCIDevice *pci_dev, int irq_num);