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/lib/dp_aux.c | 4 ++-- src/lib/edid.c | 6 +++--- src/lib/prog_loaders.c | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src/lib') diff --git a/src/lib/dp_aux.c b/src/lib/dp_aux.c index c6e2de2d62..6a925f13f6 100644 --- a/src/lib/dp_aux.c +++ b/src/lib/dp_aux.c @@ -20,13 +20,13 @@ enum i2c_over_aux dp_get_aux_cmd(enum aux_request request, uint32_t remaining_af case I2C_RAW_WRITE_AND_STOP: if (!remaining_after_this) return I2C_OVER_AUX_WRITE_MOT_0; - /* fallthrough */ + __fallthrough; case I2C_RAW_WRITE: return I2C_OVER_AUX_WRITE_MOT_1; case I2C_RAW_READ_AND_STOP: if (!remaining_after_this) return I2C_OVER_AUX_READ_MOT_0; - /* fallthrough */ + __fallthrough; case I2C_RAW_READ: return I2C_OVER_AUX_READ_MOT_1; case DPCD_WRITE: diff --git a/src/lib/edid.c b/src/lib/edid.c index 41b8031534..06b9ceefc1 100644 --- a/src/lib/edid.c +++ b/src/lib/edid.c @@ -1183,13 +1183,13 @@ int decode_edid(unsigned char *edid, int size, struct edid *out) switch (edid[0x13]) { case 4: c.claims_one_point_four = 1; - /* fall through */ + __fallthrough; case 3: c.claims_one_point_three = 1; - /* fall through */ + __fallthrough; case 2: c.claims_one_point_two = 1; - /* fall through */ + __fallthrough; default: c.claims_one_point_oh = 1; } diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c index 878f729ef9..25a8836c36 100644 --- a/src/lib/prog_loaders.c +++ b/src/lib/prog_loaders.c @@ -167,7 +167,8 @@ void payload_load(void) if (CONFIG(PAYLOAD_FIT_SUPPORT)) { fit_payload(payload, mapping); break; - } /* else fall-through */ + } + __fallthrough; default: die_with_post_code(POST_INVALID_ROM, "Unsupported payload type %d.\n", payload->cbfs_type); -- cgit v1.2.3