|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 for staging] fix compile error
In non-debug build ASSERT_UNREACHABLE is nop and some compilers will
complain that cbm_code/cbm_data may be used uninitialized in function
psr_set_l3_cbm. Add return after ASSERT_UNREACHABLE to fix it.
Signed-off-by: He Chen <he.chen@xxxxxxxxxxxxxxx>
---
Changes in v2:
Sorry for mistake in first version of this patch.
This is the correct patch.
---
xen/arch/x86/psr.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/xen/arch/x86/psr.c b/xen/arch/x86/psr.c
index d3dec3a..c5bdfce 100644
--- a/xen/arch/x86/psr.c
+++ b/xen/arch/x86/psr.c
@@ -477,6 +477,7 @@ int psr_set_l3_cbm(struct domain *d, unsigned int socket,
default:
ASSERT_UNREACHABLE();
+ return -EINVAL;
}
spin_lock(&info->cbm_lock);
--
1.9.1
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |