From: John Snow <jsnow@redhat.com>
To: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org
Subject: Re: [RFC PATCH 10/78] hw/ide/atapi.c: add fallthrough pseudo-keyword
Date: Fri, 13 Oct 2023 18:27:25 -0400 [thread overview]
Message-ID: <CAFn=p-ZZmrB3LtqAAm1wDB4b1mk6QDq9jz_giSR7TpD9Vkxg0g@mail.gmail.com> (raw)
In-Reply-To: <cef77c3b4f13c967f371d203d1aba515b05f3555.1697183082.git.manos.pitsidianakis@linaro.org>
On Fri, Oct 13, 2023 at 3:50 AM Emmanouil Pitsidianakis
<manos.pitsidianakis@linaro.org> wrote:
>
> In preparation of raising -Wimplicit-fallthrough to 5, replace all
> fall-through comments with the fallthrough attribute pseudo-keyword.
>
> Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
> ---
> hw/ide/atapi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
> index dcc39df9a4..85c74a5ffe 100644
> --- a/hw/ide/atapi.c
> +++ b/hw/ide/atapi.c
> @@ -1189,53 +1189,54 @@ static void cmd_read_disc_information(IDEState *s, uint8_t* buf)
> static void cmd_read_dvd_structure(IDEState *s, uint8_t* buf)
> {
> int max_len;
> int media = buf[1];
> int format = buf[7];
> int ret;
>
> max_len = lduw_be_p(buf + 8);
>
> if (format < 0xff) {
> if (media_is_cd(s)) {
> ide_atapi_cmd_error(s, ILLEGAL_REQUEST,
> ASC_INCOMPATIBLE_FORMAT);
> return;
> } else if (!media_present(s)) {
> ide_atapi_cmd_error(s, ILLEGAL_REQUEST,
> ASC_INV_FIELD_IN_CMD_PACKET);
> return;
> }
> }
>
> memset(buf, 0, max_len > IDE_DMA_BUF_SECTORS * BDRV_SECTOR_SIZE + 4 ?
> IDE_DMA_BUF_SECTORS * BDRV_SECTOR_SIZE + 4 : max_len);
>
> switch (format) {
> case 0x00 ... 0x7f:
> case 0xff:
> if (media == 0) {
> ret = ide_dvd_read_structure(s, format, buf, buf);
>
> if (ret < 0) {
> ide_atapi_cmd_error(s, ILLEGAL_REQUEST, -ret);
> } else {
> ide_atapi_cmd_reply(s, ret, max_len);
> }
>
> break;
> }
> /* TODO: BD support, fall through for now */
> + fallthrough;
ACK. For a moment I was wondering if this was something new to gcc,
but I guess it's just a macro you made O:-)
Acked-by: John Snow <jsnow@redhat.com>
>
> /* Generic disk structures */
> case 0x80: /* TODO: AACS volume identifier */
> case 0x81: /* TODO: AACS media serial number */
> case 0x82: /* TODO: AACS media identifier */
> case 0x83: /* TODO: AACS media key block */
> case 0x90: /* TODO: List of recognized format layers */
> case 0xc0: /* TODO: Write protection status */
> default:
> ide_atapi_cmd_error(s, ILLEGAL_REQUEST,
> ASC_INV_FIELD_IN_CMD_PACKET);
> break;
> }
> }
> --
> 2.39.2
>
next prev parent reply other threads:[~2023-10-13 22:29 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 [this message]
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
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='CAFn=p-ZZmrB3LtqAAm1wDB4b1mk6QDq9jz_giSR7TpD9Vkxg0g@mail.gmail.com' \
--to=jsnow@redhat.com \
--cc=manos.pitsidianakis@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).