Message ID | 20221205072640.2092473-3-jiamei.xie@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | xen/arm: refine vpl011 | expand |
Hi, On 05/12/2022 07:26, Jiamei Xie wrote: > In vpl011_mmio_read switch block, all cases should have a return. Add > ASSERT_UNREACHABLE to catch case where the return is not added. > > Signed-off-by: Jiamei Xie <jiamei.xie@arm.com> Acked-by: Julien Grall <jgrall@amazon.com> Cheers,
diff --git a/xen/arch/arm/vpl011.c b/xen/arch/arm/vpl011.c index f4a5621fab..c7f9dae76c 100644 --- a/xen/arch/arm/vpl011.c +++ b/xen/arch/arm/vpl011.c @@ -417,6 +417,7 @@ static int vpl011_mmio_read(struct vcpu *v, goto read_as_zero; } + ASSERT_UNREACHABLE(); return 1; read_as_zero:
In vpl011_mmio_read switch block, all cases should have a return. Add ASSERT_UNREACHABLE to catch case where the return is not added. Signed-off-by: Jiamei Xie <jiamei.xie@arm.com> --- v4 -> v5 - don't remove "return 1" and add ASSERT_UNREACHABLE v3 -> v4 - Don't consolidate check registers access - Don't remove label read_as_zero --- xen/arch/arm/vpl011.c | 1 + 1 file changed, 1 insertion(+)