mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 00:10:09 +00:00
ubi: Mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 1373884
("Missing break in switch")
Addresses-Coverity-ID: 114869 ("Missing break in switch")
Addresses-Coverity-ID: 114870 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
84df9525b0
commit
7e5583fd77
2 changed files with 3 additions and 0 deletions
|
@ -1072,6 +1072,7 @@ static int scan_peb(struct ubi_device *ubi, struct ubi_attach_info *ai,
|
||||||
* be a result of power cut during erasure.
|
* be a result of power cut during erasure.
|
||||||
*/
|
*/
|
||||||
ai->maybe_bad_peb_count += 1;
|
ai->maybe_bad_peb_count += 1;
|
||||||
|
/* fall through */
|
||||||
case UBI_IO_BAD_HDR:
|
case UBI_IO_BAD_HDR:
|
||||||
/*
|
/*
|
||||||
* If we're facing a bad VID header we have to drop *all*
|
* If we're facing a bad VID header we have to drop *all*
|
||||||
|
|
|
@ -1334,8 +1334,10 @@ static int bytes_str_to_int(const char *str)
|
||||||
switch (*endp) {
|
switch (*endp) {
|
||||||
case 'G':
|
case 'G':
|
||||||
result *= 1024;
|
result *= 1024;
|
||||||
|
/* fall through */
|
||||||
case 'M':
|
case 'M':
|
||||||
result *= 1024;
|
result *= 1024;
|
||||||
|
/* fall through */
|
||||||
case 'K':
|
case 'K':
|
||||||
result *= 1024;
|
result *= 1024;
|
||||||
if (endp[1] == 'i' && endp[2] == 'B')
|
if (endp[1] == 'i' && endp[2] == 'B')
|
||||||
|
|
Loading…
Reference in a new issue