qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org,
	 "open list:ARM SMMU" <qemu-arm@nongnu.org>,
	"open list:Block Jobs" <qemu-block@nongnu.org>
Subject: Re: [RFC PATCH 00/78] Strict disable implicit fallthrough
Date: Mon, 16 Oct 2023 21:15:13 +0300	[thread overview]
Message-ID: <CAAjaMXYJXRNqmbiY8SSXbr1hFcsN14kZp=_acXx-3f++Y-d74w@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA_fLBe9CuWFYpeuejj8dcerhFtPNX+iVaVFvH4SXx1oAg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2651 bytes --]

On Mon, 16 Oct 2023, 18:04 Peter Maydell, <peter.maydell@linaro.org> wrote:

> On Mon, 16 Oct 2023 at 15:58, Manos Pitsidianakis
> <manos.pitsidianakis@linaro.org> wrote:
> >
> > Hello Peter,
> >
> > On Mon, 16 Oct 2023, 17:13 Peter Maydell, <peter.maydell@linaro.org>
> wrote:
> >>
> >> On Fri, 13 Oct 2023 at 13:42, Markus Armbruster <armbru@redhat.com>
> wrote:
> >> >
> >> > Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> writes:
> >> >
> >> > > Hello,
> >> > >
> >> > > This RFC is inspired by the kernel's move to
> -Wimplicit-fallthrough=3
> >> > > back in 2019.[0]
> >> > > We take one step (or two) further by increasing it to 5 which
> rejects
> >> > > fall through comments and requires an attribute statement.
> >> > >
> >> > > [0]:
> >> > >
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a035d552a93b
> >> > >
> >> > > The line differences are not many, but they spread all over
> different
> >> > > subsystems, architectures and devices. An attempt has been made to
> split
> >> > > them in cohesive patches to aid post-RFC review. Part of the RFC is
> to
> >> > > determine whether these patch divisions needs improvement.
> >> > >
> >> > > Main questions this RFC poses
> >> > > =============================
> >> > >
> >> > > - Is this change desirable and net-positive.
> >> >
> >> > Unwanted fallthrough is an easy mistake to make, and
> >> > -Wimplicit-fallthrough=N helps avoid it.  The question is how far up
> we
> >> > need to push N.  Right now we're at N=2.  Has unwanted fallthrough
> been
> >> > a problem?
> >>
> >> Mmm, this is my opinion I think. We have a mechanism for
> >> catching "forgot the 'break'" already (our =2 setting) and
> >> a way to say "intentional" in a fairly natural way (add the
> >> comment). Does pushing N up any further gain us anything
> >> except a load of churn?
> >>
> >> Also, the compiler is not the only thing that processes our
> >> code: Coverity also looks for "unexpected fallthrough" issues,
> >> so if we wanted to switch away from our current practice we
> >> should check whether what we're switching to is an idiom
> >> that Coverity recognises.
> >
> >
> > It is a code style change as the cover letter mentions, it's not related
> to the static analysis itself.
>
> Yes, exactly. As a code style change it needs a fairly high level
> of justification for the code churn, and the cover letter
> doesn't really provide one...
>


As I state in the cover letter, I personally find that using one macro
instead of a comment regex feels more consistent. But your view is valid as
well!

Let's consider the RFC retracted then.

--
Manos

>

[-- Attachment #2: Type: text/html, Size: 4378 bytes --]

      reply	other threads:[~2023-10-16 18:16 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13  7:47 [RFC PATCH 00/78] Strict disable implicit fallthrough Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 01/78] include/qemu/compiler.h: replace QEMU_FALLTHROUGH with fallthrough Emmanouil Pitsidianakis
2023-10-13  8:16   ` Daniel P. Berrangé
2023-10-13  8:31     ` Manos Pitsidianakis
2023-10-13 12:28   ` Markus Armbruster
2023-10-13 12:37     ` Manos Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 02/78] block: add fallthrough pseudo-keyword Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 03/78] fpu/softfloat: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 04/78] qapi/opts-visitor: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 05/78] qobject/json: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 06/78] tcg: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 07/78] hw/virtio/virtio-balloon.c: " Emmanouil Pitsidianakis
2023-10-13  7:56   ` David Hildenbrand
2023-10-13  7:47 ` [RFC PATCH 08/78] hw/block: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 09/78] hw/acpi/aml-build.c: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 10/78] hw/ide/atapi.c: " Emmanouil Pitsidianakis
2023-10-13 22:27   ` John Snow
2023-10-13  7:47 ` [RFC PATCH 11/78] hw/timer: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 12/78] hw/usb: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 13/78] hw/adc: " Emmanouil Pitsidianakis
2023-10-13  8:13   ` Cédric Le Goater
2023-10-13  7:47 ` [RFC PATCH 14/78] util/error-report.c: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 15/78] accel/tcg: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 16/78] audio: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 17/78] ui/sdl2.c: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 18/78] ui/win32-kbd-hook.c: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 19/78] target/hppa: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 20/78] target/mips: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 21/78] target/sparc: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 22/78] target/ppc: " Emmanouil Pitsidianakis
2023-10-13  8:12   ` Cédric Le Goater
2023-10-13  7:47 ` [RFC PATCH 23/78] target/arm: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 24/78] target/alpha: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 25/78] target/i386: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 26/78] target/s390x: " Emmanouil Pitsidianakis
2023-10-13  7:57   ` David Hildenbrand
2023-10-13  7:47 ` [RFC PATCH 27/78] target/riscv: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 28/78] target/avr: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 29/78] target/cris: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 30/78] target/nios2: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 31/78] target/xtensa: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 32/78] target/m68k: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 33/78] target/rx: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 34/78] target/tricore: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 35/78] target/sh4: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 36/78] target/openrisc: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 37/78] target/hexagon: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 38/78] system/rtc.c: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 39/78] hw/scsi: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 40/78] hw/sd/sdhci.c: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 41/78] linux-user: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 42/78] hw/i386: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 43/78] hw/misc: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 44/78] hw/m68k/mcf_intc.c: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 45/78] hw/dma: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 46/78] disas: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 47/78] contrib/rdmacm-mux: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 48/78] contrib/vhost-user-scsi: " Emmanouil Pitsidianakis
2023-10-23  9:31   ` Raphael Norwitz
2023-10-13  7:48 ` [RFC PATCH 49/78] hw/arm: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 50/78] hw/audio: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 51/78] chardev: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 52/78] hw/char: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 53/78] nbd: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 54/78] hw/core: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 55/78] hw/display: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 56/78] hw/input: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 57/78] hw/net: " Emmanouil Pitsidianakis
2023-10-13  8:14 ` [RFC PATCH 00/78] Strict disable implicit fallthrough Daniel P. Berrangé
2023-10-13 12:51   ` Manos Pitsidianakis
2023-10-13 13:08     ` Daniel P. Berrangé
2023-10-13 12:15 ` BALATON Zoltan
2023-10-13 12:41 ` Markus Armbruster
2023-10-16 14:13   ` Peter Maydell
2023-10-16 14:58     ` Manos Pitsidianakis
2023-10-16 15:03       ` Peter Maydell
2023-10-16 18:15         ` Manos Pitsidianakis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAjaMXYJXRNqmbiY8SSXbr1hFcsN14kZp=_acXx-3f++Y-d74w@mail.gmail.com' \
    --to=manos.pitsidianakis@linaro.org \
    --cc=armbru@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).