qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 0/6] arm devices: mark or remove implicit fallthroug


From: Peter Maydell
Subject: [Qemu-devel] [PATCH 0/6] arm devices: mark or remove implicit fallthroughs
Date: Mon, 21 Jan 2013 12:50:50 +0000

These patches either mark implicit fallthroughs in case statements
or (in a few cases) remove them by putting in an explicit 'break'
or 'return' rather than relying on the one in the following case.
There is no behaviour change for any of these patches, and in all
cases I've examined the code and am happy that the behaviour is
intentional and correct.

This isn't intended to be a comprehensive patchset (or even a
comprehensive patchset for the ARM related files); it's just a
set of half a dozen changes for files which I care about and where
the existing behaviour was definitely correct.

I'm not a fan of the code pattern used in the omap and pxa2xx
code of incrementing an index and then falling through to an
array access, but it doesn't seem sufficiently ugly to be worth
rewriting.

Peter Maydell (6):
  hw/arm_sysctl.c: Add missing 'break' statements
  hw/omap1.c: Add fallthrough markers and breaks
  hw/omap_dma, hw/omap_spi: Explicitly mark fallthroughs
  hw/pflash_cfi02.c: Mark deliberate fallthrough
  hw/smc91c111: Add explicit 'return' rather than relying on
    fallthrough
  hw/pxa2xx_timer: Explicitly mark fallthroughs

 hw/arm_sysctl.c   |    2 ++
 hw/omap1.c        |    3 +++
 hw/omap_dma.c     |   12 ++++++++++++
 hw/omap_spi.c     |   24 ++++++++++++++++++++++++
 hw/pflash_cfi02.c |    1 +
 hw/pxa2xx_timer.c |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 hw/smc91c111.c    |    1 +
 7 files changed, 90 insertions(+)

-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]