qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Eric Auger" <eric.auger@redhat.com>,
	"Song Gao" <gaosong@loongson.cn>,
	"Xiaojuan Yang" <yangxiaojuan@loongson.cn>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	qemu-devel <qemu-devel@nongnu.org>,
	"qemu-arm@nongnu.org" <qemu-arm@nongnu.org>
Subject: Re: [RFC PATCH v2 01/78] include/qemu/compiler.h: replace QEMU_FALLTHROUGH with fallthrough
Date: Thu, 19 Oct 2023 13:42:00 +0100	[thread overview]
Message-ID: <87ttqm940w.fsf@linaro.org> (raw)
In-Reply-To: <CAFEAcA9DQ6oR3fNicuUpntfZ8QdSA8PqO5irRuzNrpkpXUJUCA@mail.gmail.com>


Peter Maydell <peter.maydell@linaro.org> writes:

> On Wed, 18 Oct 2023 at 14:12, Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>>
>> Manos Pitsidianakis <manos.pitsidianakis@linaro.org> writes:
>>
>> > On Wed, 18 Oct 2023 13:32, Alex Bennée <alex.bennee@linaro.org> wrote:
>> >>> diff --git a/audio/pwaudio.c b/audio/pwaudio.c
>> >>> index 3ce5f6507b..bf26fadb06 100644
>> >>> --- a/audio/pwaudio.c
>> >>> +++ b/audio/pwaudio.c
>> >>> @@ -1,29 +1,29 @@
>> >>>  /*
>> >>>   * QEMU PipeWire audio driver
>> >>>   *
>> >>>   * Copyright (c) 2023 Red Hat Inc.
>> >>>   *
>> >>>   * Author: Dorinda Bassey       <dbassey@redhat.com>
>> >>>   *
>> >>>   * SPDX-License-Identifier: GPL-2.0-or-later
>> >>>   */
>> >>>  +#include <spa/param/audio/format-utils.h>
>> >>> +#include <spa/utils/ringbuffer.h>
>> >>> +#include <spa/utils/result.h>
>> >>> +#include <spa/param/props.h>
>> >>>  #include "qemu/osdep.h"
>> >>>  #include "qemu/module.h"
>> >>>  #include "audio.h"
>> >>>  #include <errno.h>
>> >>>  #include "qemu/error-report.h"
>> >>>  #include "qapi/error.h"
>> >>> -#include <spa/param/audio/format-utils.h>
>> >>> -#include <spa/utils/ringbuffer.h>
>> >>> -#include <spa/utils/result.h>
>> >>> -#include <spa/param/props.h>
>> >>
>> >>Was this an autofmt change sneaking in? osdep.h should always be first
>> >>per style.rst.
>> >
>> > It should have been mentioned in the commit message and in a code
>> > comment. libspa throws errors because the preprocessor changes
>> > `fallthrough` to our macro definition. I do not like the reordering.
>> > My other thought was to undef fallthrough and re-include
>> > "qemu/compiler.h" after the libspa includes.
>>
>> Ahh this stuff:
>>
>>   #if defined(__clang__) && defined(__cplusplus) && __cplusplus >= 201103L
>>      /* clang's fallthrough annotations are only available starting in C++11. */
>>   #  define SPA_FALLTHROUGH [[clang::fallthrough]];
>>   #elif __GNUC__ >= 7 || __clang_major__ >= 10
>>   #  define SPA_FALLTHROUGH __attribute__ ((fallthrough));
>>   #else
>>   #  define SPA_FALLTHROUGH /* FALLTHROUGH */
>>   #endif
>>
>> I think this is papering over a potential problem we might have with
>> multiple libraries and probably an argument in favour of an explicit
>> QEMU_FALLTHROUGH macro to avoid the attribute clash.
>
> Is there a reason this thread lost the qemu-devel cc ?

Not deliberately. I think my mail clients objected to open list:ARM SMMU
<qemu-arm@nongnu.org> and skipped the last two CC's and I didn't notice.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  parent reply	other threads:[~2023-10-19 12:43 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13  7:56 [RFC PATCH v2 00/78] Strict disable implicit fallthrough Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 01/78] include/qemu/compiler.h: replace QEMU_FALLTHROUGH with fallthrough Emmanouil Pitsidianakis
2023-10-17 22:00   ` Eric Blake
2023-10-18 10:32   ` Alex Bennée
     [not found]     ` <2q0zq.6gn2tubfhjrk@linaro.org>
     [not found]       ` <87sf689is8.fsf@linaro.org>
     [not found]         ` <CAFEAcA9DQ6oR3fNicuUpntfZ8QdSA8PqO5irRuzNrpkpXUJUCA@mail.gmail.com>
2023-10-19 12:42           ` Alex Bennée [this message]
2023-10-13  7:56 ` [RFC PATCH v2 02/78] block: add fallthrough pseudo-keyword Emmanouil Pitsidianakis
2023-10-17 22:11   ` Eric Blake
2023-10-18  5:50     ` Manos Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 03/78] fpu/softfloat: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 04/78] qapi/opts-visitor: " Emmanouil Pitsidianakis
2023-10-17 22:11   ` Eric Blake
2023-10-13  7:56 ` [RFC PATCH v2 05/78] qobject/json: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 06/78] tcg: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 07/78] hw/virtio/virtio-balloon.c: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 08/78] hw/block: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 09/78] hw/acpi/aml-build.c: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 10/78] hw/ide/atapi.c: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 11/78] hw/timer: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 12/78] hw/usb: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 13/78] hw/adc: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 14/78] util/error-report.c: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 15/78] accel/tcg: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 16/78] audio: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 17/78] ui/sdl2.c: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 18/78] ui/win32-kbd-hook.c: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 19/78] target/hppa: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 20/78] target/mips: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 21/78] target/sparc: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 22/78] target/ppc: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 23/78] target/arm: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 24/78] target/alpha: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 25/78] target/i386: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 26/78] target/s390x: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 27/78] target/riscv: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 28/78] target/avr: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 29/78] target/cris: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 30/78] target/nios2: " Emmanouil Pitsidianakis
2023-10-13  7:56 ` [RFC PATCH v2 31/78] target/xtensa: " Emmanouil Pitsidianakis
2023-10-13  8:01   ` Max Filippov
2023-10-13  7:56 ` [RFC PATCH v2 32/78] target/m68k: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 33/78] target/rx: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 34/78] target/tricore: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 35/78] target/sh4: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 36/78] target/openrisc: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 37/78] target/hexagon: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 38/78] system/rtc.c: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 39/78] hw/scsi: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 40/78] hw/sd/sdhci.c: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 41/78] linux-user: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 42/78] hw/i386: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 43/78] hw/misc: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 44/78] hw/m68k/mcf_intc.c: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 45/78] hw/dma: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 46/78] disas: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 47/78] contrib/rdmacm-mux: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 48/78] contrib/vhost-user-scsi: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 49/78] hw/arm: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 50/78] hw/audio: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 51/78] chardev: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 52/78] hw/char: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 53/78] nbd: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 54/78] hw/core: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 55/78] hw/display: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 56/78] hw/input: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 57/78] hw/net: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 58/78] hw/ppc: " Emmanouil Pitsidianakis
2023-10-13  8:32   ` Harsh Prateek Bora
2023-10-13  9:40     ` Cédric Le Goater
2023-10-13  7:57 ` [RFC PATCH v2 59/78] hw/intc: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 60/78] qga: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 61/78] semihosting: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 62/78] hw/gpio: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 63/78] hw/ipmi: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 64/78] hw/mips: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 65/78] hw/nvme: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 66/78] hw/nvram/eeprom_at24c.c: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 67/78] hw/pci-host/pnv_phb3.c: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 68/78] hw/pci: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 69/78] hw/rdma/rdma_backend.c: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 70/78] hw/rtc: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 71/78] hw/s390x: " Emmanouil Pitsidianakis
2023-10-13  8:03   ` David Hildenbrand
2023-10-13  7:57 ` [RFC PATCH v2 72/78] hw/ssi: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 73/78] hw/watchdog/wdt_diag288.c: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 74/78] hw/cxl/cxl-device-utils.c: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 75/78] migration: " Emmanouil Pitsidianakis
2023-10-13  8:55   ` Juan Quintela
2023-10-13  7:57 ` [RFC PATCH v2 76/78] qemu-img.c: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 77/78] tests/unit/test-char.c: " Emmanouil Pitsidianakis
2023-10-13  7:57 ` [RFC PATCH v2 78/78] meson.build: increase -Wimplicit-fallthrough to 5 Emmanouil Pitsidianakis
2023-10-17 21:52 ` [RFC PATCH v2 00/78] Strict disable implicit fallthrough Eric Blake

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=87ttqm940w.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=eric.auger@redhat.com \
    --cc=gaosong@loongson.cn \
    --cc=kraxel@redhat.com \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=yangxiaojuan@loongson.cn \
    /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).