summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2020-12-15 06:15:00 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2020-12-15 23:13:47 +0300
commit01359eb2013b4b1e87b22db0f532c2e0b7aee001 (patch)
tree5b6791e5d3dee0d9f18dc75ed1c967d4dfb2f01e /mm
parentbf16d19aabd8f5fbd220e9f83a3925a33cd88e81 (diff)
downloadlinux-01359eb2013b4b1e87b22db0f532c2e0b7aee001.tar.xz
mm: fix fall-through warnings for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of warnings by explicitly adding a break statement instead of just letting the code fall through to the next, and by adding a fallthrough pseudo-keyword in places where the code is intended to fall through. Link: https://github.com/KSPP/linux/issues/115 Link: https://lkml.kernel.org/r/f5756988b8842a3f10008fbc5b0a654f828920a9.1605896059.git.gustavoars@kernel.org Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/mm_init.c1
-rw-r--r--mm/vmscan.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/mm/mm_init.c b/mm/mm_init.c
index b06a30fbedff..8e02e865cc65 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -173,6 +173,7 @@ static int __meminit mm_compute_batch_notifier(struct notifier_block *self,
case MEM_ONLINE:
case MEM_OFFLINE:
mm_compute_batch(sysctl_overcommit_memory);
+ break;
default:
break;
}
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 20d10958b455..242368592ea7 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1369,6 +1369,7 @@ static unsigned int shrink_page_list(struct list_head *page_list,
if (PageDirty(page) || PageWriteback(page))
goto keep_locked;
mapping = page_mapping(page);
+ fallthrough;
case PAGE_CLEAN:
; /* try to free the page below */
}