qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/6] arm devices: mark or remove implicit fallthroughs
@ 2013-01-21 12:50 Peter Maydell
  2013-01-21 12:50 ` [Qemu-devel] [PATCH 1/6] hw/arm_sysctl.c: Add missing 'break' statements Peter Maydell
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Peter Maydell @ 2013-01-21 12:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl, patches

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-01-21 13:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-21 12:50 [Qemu-devel] [PATCH 0/6] arm devices: mark or remove implicit fallthroughs Peter Maydell
2013-01-21 12:50 ` [Qemu-devel] [PATCH 1/6] hw/arm_sysctl.c: Add missing 'break' statements Peter Maydell
2013-01-21 12:50 ` [Qemu-devel] [PATCH 2/6] hw/omap1.c: Add fallthrough markers and breaks Peter Maydell
2013-01-21 12:50 ` [Qemu-devel] [PATCH 3/6] hw/omap_dma, hw/omap_spi: Explicitly mark fallthroughs Peter Maydell
2013-01-21 12:50 ` [Qemu-devel] [PATCH 4/6] hw/pflash_cfi02.c: Mark deliberate fallthrough Peter Maydell
2013-01-21 12:50 ` [Qemu-devel] [PATCH 5/6] hw/smc91c111: Add explicit 'return' rather than relying on fallthrough Peter Maydell
2013-01-21 12:50 ` [Qemu-devel] [PATCH 6/6] hw/pxa2xx_timer: Explicitly mark fallthroughs Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).