mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + mm-fix-fall-through-warnings-for-clang.patch added to -mm tree
@ 2020-11-20 21:07 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2020-11-20 21:07 UTC (permalink / raw)
  To: gustavoars, mm-commits


The patch titled
     Subject: mm: fix fall-through warnings for Clang
has been added to the -mm tree.  Its filename is
     mm-fix-fall-through-warnings-for-clang.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-fix-fall-through-warnings-for-clang.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-fix-fall-through-warnings-for-clang.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Subject: 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>
---

 mm/mm_init.c |    1 +
 mm/vmscan.c  |    1 +
 2 files changed, 2 insertions(+)

--- a/mm/mm_init.c~mm-fix-fall-through-warnings-for-clang
+++ a/mm/mm_init.c
@@ -173,6 +173,7 @@ static int __meminit mm_compute_batch_no
 	case MEM_ONLINE:
 	case MEM_OFFLINE:
 		mm_compute_batch(sysctl_overcommit_memory);
+		break;
 	default:
 		break;
 	}
--- a/mm/vmscan.c~mm-fix-fall-through-warnings-for-clang
+++ a/mm/vmscan.c
@@ -1369,6 +1369,7 @@ static unsigned int shrink_page_list(str
 				if (PageDirty(page) || PageWriteback(page))
 					goto keep_locked;
 				mapping = page_mapping(page);
+				fallthrough;
 			case PAGE_CLEAN:
 				; /* try to free the page below */
 			}
_

Patches currently in -mm which might be from gustavoars@kernel.org are

mm-fix-fall-through-warnings-for-clang.patch
lib-stackdepotc-replace-one-element-array-with-flexible-array-member.patch
lib-stackdepotc-use-flex_array_size-helper-in-memcpy.patch
lib-stackdepotc-use-array_size-helper-in-jhash2.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-20 21:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-20 21:07 + mm-fix-fall-through-warnings-for-clang.patch added to -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).