[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v5 2/2] xen/arm: vpl011: add ASSERT_UNREACHABLE in vpl011_mmio_read



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@xxxxxxx>
---
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(+)

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:
-- 
2.25.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.