[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v2 74/78] hw/cxl/cxl-device-utils.c: add fallthrough pseudo-k
|
From: |
Emmanouil Pitsidianakis |
|
Subject: |
[RFC PATCH v2 74/78] hw/cxl/cxl-device-utils.c: add fallthrough pseudo-keyword |
|
Date: |
Fri, 13 Oct 2023 10:57:41 +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/cxl/cxl-device-utils.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/cxl/cxl-device-utils.c b/hw/cxl/cxl-device-utils.c
index bd68328032..63f009847e 100644
--- a/hw/cxl/cxl-device-utils.c
+++ b/hw/cxl/cxl-device-utils.c
@@ -78,18 +78,18 @@ static uint64_t mailbox_reg_read(void *opaque, hwaddr
offset, unsigned size)
static void mailbox_mem_writel(uint32_t *reg_state, hwaddr offset,
uint64_t value)
{
switch (offset) {
case A_CXL_DEV_MAILBOX_CTRL:
- /* fallthrough */
+ fallthrough;
case A_CXL_DEV_MAILBOX_CAP:
/* RO register */
break;
default:
qemu_log_mask(LOG_UNIMP,
"%s Unexpected 32-bit access to 0x%" PRIx64 " (WI)\n",
__func__, offset);
return;
}
reg_state[offset / sizeof(*reg_state)] = value;
}
@@ -97,22 +97,22 @@ static void mailbox_mem_writel(uint32_t *reg_state, hwaddr
offset,
static void mailbox_mem_writeq(uint64_t *reg_state, hwaddr offset,
uint64_t value)
{
switch (offset) {
case A_CXL_DEV_MAILBOX_CMD:
break;
case A_CXL_DEV_BG_CMD_STS:
/* BG not supported */
- /* fallthrough */
+ fallthrough;
case A_CXL_DEV_MAILBOX_STS:
/* Read only register, will get updated by the state machine */
return;
default:
qemu_log_mask(LOG_UNIMP,
"%s Unexpected 64-bit access to 0x%" PRIx64 " (WI)\n",
__func__, offset);
return;
}
reg_state[offset / sizeof(*reg_state)] = value;
}
--
2.39.2
- [RFC PATCH v2 68/78] hw/pci: add fallthrough pseudo-keyword, (continued)
- [RFC PATCH v2 68/78] hw/pci: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v2 69/78] hw/rdma/rdma_backend.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v2 75/78] migration: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v2 66/78] hw/nvram/eeprom_at24c.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v2 65/78] hw/nvme: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v2 67/78] hw/pci-host/pnv_phb3.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v2 77/78] tests/unit/test-char.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v2 70/78] hw/rtc: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v2 73/78] hw/watchdog/wdt_diag288.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v2 74/78] hw/cxl/cxl-device-utils.c: add fallthrough pseudo-keyword,
Emmanouil Pitsidianakis <=
- [RFC PATCH v2 76/78] qemu-img.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v2 71/78] hw/s390x: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v2 72/78] hw/ssi: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v2 78/78] meson.build: increase -Wimplicit-fallthrough to 5, Emmanouil Pitsidianakis, 2023/10/13
- Re: [RFC PATCH v2 00/78] Strict disable implicit fallthrough, Eric Blake, 2023/10/17