|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XEN PATCH] xen/evtchn: address violations of MISRA C:2012 Rules 16.3 and 16.4
Add missing break statements to address violations of MISRA C:2012
Rule 16.3 ("An unconditional `break' statement shall terminate every
switch-clause").
Add missing default cases to address violations of MISRA C:2012
Rule 16.4 (Every `switch' statement shall have a `default' label).
No functional change.
Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx>
---
xen/common/event_channel.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index 15aec5dcbb..cf19020e49 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -130,9 +130,12 @@ static bool virq_is_global(unsigned int virq)
case VIRQ_ARCH_0 ... VIRQ_ARCH_7:
return arch_virq_is_global(virq);
+
+ default:
+ ASSERT(virq < NR_VIRQS);
+ break;
}
- ASSERT(virq < NR_VIRQS);
return true;
}
@@ -846,6 +849,7 @@ int evtchn_send(struct domain *ld, unsigned int lport)
break;
default:
ret = -EINVAL;
+ break;
}
out:
@@ -1672,6 +1676,9 @@ static void domain_dump_evtchn_info(struct domain *d)
case ECS_VIRQ:
printk(" v=%d", chn->u.virq);
break;
+ default:
+ /* Nothing to do in other cases. */
+ break;
}
ssid = xsm_show_security_evtchn(d, chn);
--
2.34.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |