From fff20212afe2c83af90dbec39d112a31d34b6658 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Mon, 15 Mar 2021 14:56:16 +0100 Subject: Use the fallthrough statement in switch loops Clang does not seem to work with 'fall through' in comments. Change-Id: Idcbe373be33ef7247548f856bfaba7ceb7f749b5 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/51498 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Tim Wawrzynczak --- src/ec/google/chromeec/ec_acpi.c | 3 ++- src/ec/kontron/kempld/kempld.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/ec') diff --git a/src/ec/google/chromeec/ec_acpi.c b/src/ec/google/chromeec/ec_acpi.c index e344df098b..bf224b03e1 100644 --- a/src/ec/google/chromeec/ec_acpi.c +++ b/src/ec/google/chromeec/ec_acpi.c @@ -111,7 +111,8 @@ static const char *port_location_to_str(enum ec_pd_port_location port_location) return "BACK_LEFT"; case EC_PD_PORT_LOCATION_BACK_RIGHT: return "BACK_RIGHT"; - case EC_PD_PORT_LOCATION_UNKNOWN: /* intentional fallthrough */ + case EC_PD_PORT_LOCATION_UNKNOWN: + __fallthrough; default: return "UNKNOWN"; } diff --git a/src/ec/kontron/kempld/kempld.c b/src/ec/kontron/kempld/kempld.c index 0489bac042..31d927d029 100644 --- a/src/ec/kontron/kempld/kempld.c +++ b/src/ec/kontron/kempld/kempld.c @@ -82,13 +82,13 @@ static void kempld_enable_dev(struct device *const dev) dev->ops = &kempld_uart_ops; break; } - /* Fall through. */ + __fallthrough; case 1: if (dev->path.generic.subid == 0) { kempld_i2c_device_init(dev); break; } - /* Fall through. */ + __fallthrough; default: printk(BIOS_WARNING, "KEMPLD: Spurious device %s.\n", dev_path(dev)); break; -- cgit v1.2.3