diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2019-02-08 13:12:10 -0500 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2019-05-06 15:57:05 -0400 |
commit | fae4973c9a58858bc63a842cdaf7810955503399 (patch) | |
tree | 3ba6ef7a698ca8d923f5267555c47c973ced0436 /drivers/mtd/lpddr | |
parent | 098d74b4eaf63b7ab13ebdac4ad95f6b214b5f62 (diff) |
mtd: lpddr_cmds: Mark expected switch fall-through
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.
This patch fixes the following warnings:
drivers/mtd/lpddr/lpddr_cmds.c: In function ‘chip_ready’:
drivers/mtd/lpddr/lpddr_cmds.c:319:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (mode == FL_READY && chip->oldstate == FL_READY)
^
drivers/mtd/lpddr/lpddr_cmds.c:322:2: note: here
default:
^~~~~~~
Warning level 3 was used: -Wimplicit-fallthrough=3
This patch is part of the ongoing efforts to enabling
-Wimplicit-fallthrough.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'drivers/mtd/lpddr')
-rw-r--r-- | drivers/mtd/lpddr/lpddr_cmds.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c index b13557fe52bd..76a4c73e100e 100644 --- a/drivers/mtd/lpddr/lpddr_cmds.c +++ b/drivers/mtd/lpddr/lpddr_cmds.c | |||
@@ -318,6 +318,7 @@ static int chip_ready(struct map_info *map, struct flchip *chip, int mode) | |||
318 | /* Only if there's no operation suspended... */ | 318 | /* Only if there's no operation suspended... */ |
319 | if (mode == FL_READY && chip->oldstate == FL_READY) | 319 | if (mode == FL_READY && chip->oldstate == FL_READY) |
320 | return 0; | 320 | return 0; |
321 | /* fall through */ | ||
321 | 322 | ||
322 | default: | 323 | default: |
323 | sleep: | 324 | sleep: |