fix compile error
PATCH v2 1/1 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.
---
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(+)
xen/arch/x86/psr.c +1 -0
@@ -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);
Signature · 1 line
1.9.1
Hi,
"fix compiler error" is too vast. The commit title should be more meaningful. Something like:
"x86: psr: fix compilation on non-debug build after 44f126d"
Quoted 26 lines · He Chen
In non-debug build
ASSERT_UNREACHABLEis nop and some compilers will complain that cbm_code/cbm_data may be used uninitialized in functionpsr_set_l3_cbm. Add return afterASSERT_UNREACHABLEto fix it.Signed-off-by He Chen <[email protected]>---
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(+)xen/arch/x86/psr.c +1
-0@@ -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);
Signature · 1 line
Julien Grall