mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 20:54:10 +08:00
mtd: cfi: Fix fall-through warnings for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements and a return instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Acked-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20210305081933.GA137147@embeddedor
This commit is contained in:
parent
620b90d30c
commit
c6f51f1f55
@ -2549,6 +2549,7 @@ static int cfi_intelext_suspend(struct mtd_info *mtd)
|
||||
anyway? The latter for now. */
|
||||
printk(KERN_NOTICE "Flash device refused suspend due to active operation (state %d)\n", chip->state);
|
||||
ret = -EAGAIN;
|
||||
break;
|
||||
case FL_PM_SUSPENDED:
|
||||
break;
|
||||
}
|
||||
|
@ -902,6 +902,7 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr
|
||||
/* Someone else might have been playing with it. */
|
||||
goto retry;
|
||||
}
|
||||
return 0;
|
||||
|
||||
case FL_READY:
|
||||
case FL_CFI_QUERY:
|
||||
@ -2994,6 +2995,7 @@ static int cfi_amdstd_suspend(struct mtd_info *mtd)
|
||||
* as the whole point is that nobody can do anything
|
||||
* with the chip now anyway.
|
||||
*/
|
||||
break;
|
||||
case FL_PM_SUSPENDED:
|
||||
break;
|
||||
|
||||
|
@ -1332,6 +1332,8 @@ static int cfi_staa_suspend(struct mtd_info *mtd)
|
||||
* as the whole point is that nobody can do anything
|
||||
* with the chip now anyway.
|
||||
*/
|
||||
break;
|
||||
|
||||
case FL_PM_SUSPENDED:
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user