summaryrefslogtreecommitdiffstats
path: root/lib/cmdline.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-12-16 09:24:16 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2020-12-16 09:24:16 +0100
commit5e60366d56c630e32befce7ef05c569e04391ca3 (patch)
tree29e1f2ae1191d6b1741dd2bec179514c2dcab632 /lib/cmdline.c
parentMerge tag 'linux-kselftest-kunit-5.11-rc1' of git://git.kernel.org/pub/scm/li... (diff)
parentlib: Fix fall-through warnings for Clang (diff)
downloadlinux-5e60366d56c630e32befce7ef05c569e04391ca3.tar.xz
linux-5e60366d56c630e32befce7ef05c569e04391ca3.zip
Merge tag 'fallthrough-fixes-clang-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux
Pull fallthrough fixes from Gustavo A. R. Silva: "Fix many fall-through warnings when building with Clang 12.0.0 using -Wimplicit-fallthrough. - powerpc: boot: include compiler_attributes.h (Nick Desaulniers) - Revert "lib: Revert use of fallthrough pseudo-keyword in lib/" (Nick Desaulniers) - powerpc: fix -Wimplicit-fallthrough (Nick Desaulniers) - lib: Fix fall-through warnings for Clang (Gustavo A. R. Silva)" * tag 'fallthrough-fixes-clang-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: lib: Fix fall-through warnings for Clang powerpc: fix -Wimplicit-fallthrough Revert "lib: Revert use of fallthrough pseudo-keyword in lib/" powerpc: boot: include compiler_attributes.h
Diffstat (limited to 'lib/cmdline.c')
-rw-r--r--lib/cmdline.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/cmdline.c b/lib/cmdline.c
index 9e186234edc0..b390dd03363b 100644
--- a/lib/cmdline.c
+++ b/lib/cmdline.c
@@ -144,27 +144,28 @@ unsigned long long memparse(const char *ptr, char **retptr)
case 'E':
case 'e':
ret <<= 10;
- /* fall through */
+ fallthrough;
case 'P':
case 'p':
ret <<= 10;
- /* fall through */
+ fallthrough;
case 'T':
case 't':
ret <<= 10;
- /* fall through */
+ fallthrough;
case 'G':
case 'g':
ret <<= 10;
- /* fall through */
+ fallthrough;
case 'M':
case 'm':
ret <<= 10;
- /* fall through */
+ fallthrough;
case 'K':
case 'k':
ret <<= 10;
endptr++;
+ fallthrough;
default:
break;
}