[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v3 70/78] hw/rtc: add fallthrough pseudo-keyword
|
From: |
Emmanouil Pitsidianakis |
|
Subject: |
[RFC PATCH v3 70/78] hw/rtc: add fallthrough pseudo-keyword |
|
Date: |
Fri, 13 Oct 2023 11:46:38 +0300 |
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/rtc/aspeed_rtc.c | 4 ++--
hw/rtc/mc146818rtc.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/rtc/aspeed_rtc.c b/hw/rtc/aspeed_rtc.c
index fa861e2d49..59c64b01b9 100644
--- a/hw/rtc/aspeed_rtc.c
+++ b/hw/rtc/aspeed_rtc.c
@@ -78,7 +78,7 @@ static uint64_t aspeed_rtc_read(void *opaque, hwaddr addr,
if (rtc->reg[CONTROL] & RTC_ENABLED) {
rtc->reg[r] = aspeed_rtc_get_counter(rtc, r);
}
- /* fall through */
+ fallthrough;
case CONTROL:
val = rtc->reg[r];
break;
@@ -106,7 +106,7 @@ static void aspeed_rtc_write(void *opaque, hwaddr addr,
if (!(rtc->reg[CONTROL] & RTC_UNLOCKED)) {
break;
}
- /* fall through */
+ fallthrough;
case CONTROL:
rtc->reg[r] = val;
aspeed_rtc_calc_offset(rtc);
diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c
index c27c362db9..6b6eef94fd 100644
--- a/hw/rtc/mc146818rtc.c
+++ b/hw/rtc/mc146818rtc.c
@@ -457,7 +457,7 @@ static void cmos_ioport_write(void *opaque, hwaddr addr,
break;
case RTC_IBM_PS2_CENTURY_BYTE:
s->cmos_index = RTC_CENTURY;
- /* fall through */
+ fallthrough;
case RTC_CENTURY:
case RTC_SECONDS:
case RTC_MINUTES:
@@ -686,7 +686,7 @@ static uint64_t cmos_ioport_read(void *opaque, hwaddr addr,
switch(s->cmos_index) {
case RTC_IBM_PS2_CENTURY_BYTE:
s->cmos_index = RTC_CENTURY;
- /* fall through */
+ fallthrough;
case RTC_CENTURY:
case RTC_SECONDS:
case RTC_MINUTES:
--
2.39.2
- [RFC PATCH v3 60/78] qga: add fallthrough pseudo-keyword, (continued)
- [RFC PATCH v3 60/78] qga: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 61/78] semihosting: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 59/78] hw/intc: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 66/78] hw/nvram/eeprom_at24c.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 68/78] hw/pci: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 64/78] hw/mips: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 69/78] hw/rdma/rdma_backend.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 65/78] hw/nvme: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 67/78] hw/pci-host/pnv_phb3.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 70/78] hw/rtc: add fallthrough pseudo-keyword,
Emmanouil Pitsidianakis <=
- [RFC PATCH v3 71/78] hw/s390x: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 75/78] migration: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 74/78] hw/cxl/cxl-device-utils.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 72/78] hw/ssi: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 78/78] meson.build: increase -Wimplicit-fallthrough to 5, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 62/78] hw/gpio: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 73/78] hw/watchdog/wdt_diag288.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13