soc/amd/common/block/lpc/espi_util: use __fallthrough
Using __fallthrough instead of a comment about the fall-through being
intentional should make clang stop complaining about intended fall-
through statements.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I940529be02e20c72f6e97b2cfa10f0dd8f7020b6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62216
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
diff --git a/src/soc/amd/common/block/lpc/espi_util.c b/src/soc/amd/common/block/lpc/espi_util.c
index 40f22d5..c61c61f 100644
--- a/src/soc/amd/common/block/lpc/espi_util.c
+++ b/src/soc/amd/common/block/lpc/espi_util.c
@@ -640,7 +640,7 @@
break;
}
printk(BIOS_ERR, "eSPI Quad I/O not supported. Dropping to dual mode.\n");
- /* Intentional fall-through */
+ __fallthrough;
case ESPI_IO_MODE_DUAL:
if (espi_slave_supports_dual_io(slave_caps)) {
*slave_config |= ESPI_SLAVE_IO_MODE_SEL_DUAL;
@@ -648,7 +648,7 @@
break;
}
printk(BIOS_ERR, "eSPI Dual I/O not supported. Dropping to single mode.\n");
- /* Intentional fall-through */
+ __fallthrough;
case ESPI_IO_MODE_SINGLE:
/* Single I/O mode is always supported. */
*slave_config |= ESPI_SLAVE_IO_MODE_SEL_SINGLE;
@@ -672,7 +672,7 @@
break;
}
printk(BIOS_ERR, "eSPI 66MHz not supported. Dropping to 33MHz.\n");
- /* Intentional fall-through */
+ __fallthrough;
case ESPI_OP_FREQ_33_MHZ:
if (slave_max_speed_mhz >= 33) {
*slave_config |= ESPI_SLAVE_OP_FREQ_SEL_33_MHZ;
@@ -680,7 +680,7 @@
break;
}
printk(BIOS_ERR, "eSPI 33MHz not supported. Dropping to 16MHz.\n");
- /* Intentional fall-through */
+ __fallthrough;
case ESPI_OP_FREQ_16_MHZ:
/*
* eSPI spec says the minimum frequency is 20MHz, but AMD datasheets support
@@ -691,7 +691,7 @@
*ctrlr_config |= ESPI_OP_FREQ_16_MHZ;
break;
}
- /* Intentional fall-through */
+ __fallthrough;
default:
die("No supported eSPI Operating Frequency!\n");
}