qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
To: qemu-devel@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org
Cc: "Emmanouil Pitsidianakis" <manos.pitsidianakis@linaro.org>,
	"Joel Stanley" <joel@jms.id.au>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: [RFC PATCH 51/75] hw/char: add fallthrough pseudo-keyword
Date: Fri, 13 Oct 2023 10:48:10 +0300	[thread overview]
Message-ID: <c5632702ea33995c5f4f02d3b1e70eead463be40.1697034504.git.manos.pitsidianakis@linaro.org> (raw)
In-Reply-To: <cover.1697034504.git.manos.pitsidianakis@linaro.org>

Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
---
 hw/char/nrf51_uart.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/char/nrf51_uart.c b/hw/char/nrf51_uart.c
index dfe2276d71..3e2b35c7ad 100644
--- a/hw/char/nrf51_uart.c
+++ b/hw/char/nrf51_uart.c
@@ -113,79 +113,79 @@ static void uart_cancel_transmit(NRF51UARTState *s)
 static void uart_write(void *opaque, hwaddr addr,
                        uint64_t value, unsigned int size)
 {
     NRF51UARTState *s = NRF51_UART(opaque);
 
     trace_nrf51_uart_write(addr, value, size);
 
     if (!s->enabled && (addr != A_UART_ENABLE)) {
         return;
     }
 
     switch (addr) {
     case A_UART_TXD:
         if (!s->pending_tx_byte && s->tx_started) {
             s->reg[R_UART_TXD] = value;
             s->pending_tx_byte = true;
             uart_transmit(NULL, G_IO_OUT, s);
         }
         break;
     case A_UART_INTEN:
         s->reg[R_UART_INTEN] = value;
         break;
     case A_UART_INTENSET:
         s->reg[R_UART_INTEN] |= value;
         break;
     case A_UART_INTENCLR:
         s->reg[R_UART_INTEN] &= ~value;
         break;
     case A_UART_TXDRDY ... A_UART_RXTO:
         s->reg[addr / 4] = value;
         break;
     case A_UART_ERRORSRC:
         s->reg[addr / 4] &= ~value;
         break;
     case A_UART_RXD:
         break;
     case A_UART_RXDRDY:
         if (value == 0) {
             s->reg[R_UART_RXDRDY] = 0;
         }
         break;
     case A_UART_STARTTX:
         if (value == 1) {
             s->tx_started = true;
         }
         break;
     case A_UART_STARTRX:
         if (value == 1) {
             s->rx_started = true;
         }
         break;
     case A_UART_ENABLE:
         if (value) {
             if (value == 4) {
                 s->enabled = true;
             }
             break;
         }
         s->enabled = false;
         value = 1;
-        /* fall through */
+        fallthrough;
     case A_UART_SUSPEND:
     case A_UART_STOPTX:
         if (value == 1) {
             s->tx_started = false;
         }
-        /* fall through */
+        fallthrough;
     case A_UART_STOPRX:
         if (addr != A_UART_STOPTX && value == 1) {
             s->rx_started = false;
             s->reg[R_UART_RXTO] = 1;
         }
         break;
     default:
         s->reg[addr / 4] = value;
         break;
     }
     nrf51_uart_update_irq(s);
 }
-- 
2.39.2



  parent reply	other threads:[~2023-10-13  7:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1697034504.git.manos.pitsidianakis@linaro.org>
2023-10-13  7:47 ` [RFC PATCH 37/75] system/rtc.c: add fallthrough pseudo-keyword Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 38/75] hw/scsi: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 39/75] hw/sd/sdhci.c: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 40/75] linux-user: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 41/75] hw/i386: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 42/75] hw/misc: " Emmanouil Pitsidianakis
2023-10-13  8:11   ` Cédric Le Goater
2023-10-13  7:47 ` [RFC PATCH 43/75] hw/m68k/mcf_intc.c: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 44/75] hw/dma: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 45/75] disas: " Emmanouil Pitsidianakis
2023-10-13  7:47 ` [RFC PATCH 46/75] contrib/rdmacm-mux: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 47/75] contrib/vhost-user-scsi: " Emmanouil Pitsidianakis
2023-10-23  9:31   ` Raphael Norwitz
2023-10-13  7:48 ` [RFC PATCH 48/75] hw/arm: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 49/75] hw/audio: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 50/75] chardev: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` Emmanouil Pitsidianakis [this message]
2023-10-13  7:48 ` [RFC PATCH 52/75] nbd: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 53/75] hw/core: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 54/75] hw/display: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 55/75] hw/input: " Emmanouil Pitsidianakis
2023-10-13  7:48 ` [RFC PATCH 56/75] hw/net: " Emmanouil 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=c5632702ea33995c5f4f02d3b1e70eead463be40.1697034504.git.manos.pitsidianakis@linaro.org \
    --to=manos.pitsidianakis@linaro.org \
    --cc=joel@jms.id.au \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@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).