summaryrefslogtreecommitdiff
path: root/drivers/mtd/ubi/attach.c
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2025-03-27 15:33:07 +0000
committerTom Rini <trini@konsulko.com>2025-04-08 16:23:51 -0600
commit64bc0124581b49093f5c348f5debe8889a56fedd (patch)
tree560ddb8ba00b2a9addfb056ebf8864353bab86a0 /drivers/mtd/ubi/attach.c
parent960d3d933dbda88aed6d4fcf0711dbc7448ffd83 (diff)
mtd: ubi: annotate fallthrough
The UBI code uses an implicit switch/case fallthrough when handling two related cases of bad header errors. Also there is a switch/case for unit prefix handling (G/M/K), which accumulates multiplications. Add our "fallthrough;" statement-like macro before the respective labels in both cases, to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'drivers/mtd/ubi/attach.c')
-rw-r--r--drivers/mtd/ubi/attach.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c
index 2ef8fde3d32..306da509ec4 100644
--- a/drivers/mtd/ubi/attach.c
+++ b/drivers/mtd/ubi/attach.c
@@ -934,6 +934,7 @@ static int scan_peb(struct ubi_device *ubi, struct ubi_attach_info *ai,
* be a result of power cut during erasure.
*/
ai->maybe_bad_peb_count += 1;
+ fallthrough;
case UBI_IO_BAD_HDR:
if (ec_err)
/*