Skip to contentSkip to conversation

mm/shmem.c: mark expected switch fall-through

PATCH New [email protected] 1 participant 1 message Nov 16, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 121/131 mm/shmem.c: mark expected switch fall-through

From: "Gustavo A. R. Silva" <[email protected]>
Subject: mm/shmem.c: mark expected switch fall-through

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.

---

 mm/shmem.c |    1 +
 1 file changed, 1 insertion(+)
mm/shmem.c renamed from mm/shmem.c~mm-shmem-mark-expected-switch-fall-through +1 -0
diff -puN mm/shmem.c~mm-shmem-mark-expected-switch-fall-through mm/shmem.c
@@ -4098,6 +4098,7 @@ bool shmem_huge_enabled(struct vm_area_s
 			if (i_size >= HPAGE_PMD_SIZE &&
 					i_size >> PAGE_SHIFT >= off)
 				return true;
+			/* fall through */
 		case SHMEM_HUGE_ADVISE:
 			/* TODO: implement fadvise() hints */
 			return (vma->vm_flags & VM_HUGEPAGE);

_