Skip to content

RFC Add missing default labels to switch statements

Oleksandr Andrushchenko xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 76 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4cert:arch/arm: Add missing default labels to switch statementsxen/arch/arm/decode.c xen/arch/arm/domain.c xen/arch/arm/guest_walk.c +4 more+40 -01 reply
2/4cert:xen/common: Add missing default labels to switch statementsxen/common/device_tree.c xen/common/domain.c xen/common/efi/boot.c +12 more+66 -10 replies
3/4cert:xen/drivers: Add missing default labels to switch statementsxen/drivers/char/console.c xen/drivers/char/ns16550.c xen/drivers/passthrough/arm/smmu.c+16 -00 replies
4/4cert:xen/xsm/flask: Add missing default labels to switch statementsxen/xsm/flask/avc.c xen/xsm/flask/hooks.c xen/xsm/flask/ss/services.c+11 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/4] Add missing default labels to switch statements

From: Oleksandr Andrushchenko <[email protected]>

Hello, everybody!

We at EPAM Systems would like to present first series of patches targeting Xen on ARM Functional Safety certification (ISO61508 based): implementation of MISRA [1] C:2012 Rule 16.4 which requires that every switch statement has a default label as a measure of defensive programming technique.

Current patch series is against the source code used by Xen hypervisor on ARM only and does not include Xen tools and x86 implementation. Although the target is limited to ARM it does touch the code common to other architectures as well.

[1] https://www.misra.org.uk/

Oleksandr Andrushchenko (4):
cert:arch/arm: Add missing default labels to switch statements cert:xen/common: Add missing default labels to switch statements cert:xen/drivers: Add missing default labels to switch statements cert:xen/xsm/flask: Add missing default labels to switch statements

 xen/arch/arm/decode.c              |  3 +++
 xen/arch/arm/domain.c              | 10 ++++++++++
 xen/arch/arm/guest_walk.c          |  2 ++
 xen/arch/arm/mm.c                  |  3 +++
 xen/arch/arm/p2m.c                 |  7 +++++++
 xen/arch/arm/traps.c               |  6 ++++++
 xen/arch/arm/vsmc.c                |  9 +++++++++
 xen/common/device_tree.c           |  2 ++
 xen/common/domain.c                |  4 ++++
 xen/common/efi/boot.c              |  2 ++
 xen/common/event_channel.c         |  5 +++++
 xen/common/grant_table.c           | 18 +++++++++++++++++-
 xen/common/kernel.c                |  6 ++++++
 xen/common/libelf/libelf-dominfo.c |  3 +++
 xen/common/libfdt/fdt.c            |  2 ++
 xen/common/libfdt/fdt_ro.c         |  3 +++
 xen/common/sched_arinc653.c        |  3 +++
 xen/common/sched_credit.c          |  3 +++
 xen/common/sched_credit2.c         |  3 +++
 xen/common/sched_rt.c              |  3 +++
 xen/common/trace.c                 |  2 ++
 xen/common/vsprintf.c              |  8 ++++++++
 xen/drivers/char/console.c         |  5 +++++
 xen/drivers/char/ns16550.c         |  2 ++
 xen/drivers/passthrough/arm/smmu.c |  9 +++++++++
 xen/xsm/flask/avc.c                |  2 ++
 xen/xsm/flask/hooks.c              |  4 ++++
 xen/xsm/flask/ss/services.c        |  5 +++++
 28 files changed, 133 insertions(+), 1 deletion(-)
Signature · 7 lines
2.20.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel