Skip to contentSkip to conversation

mm: list_lru: mark expected switch fall-through

PATCH Applied Gustavo A. R. Silva 1 participant 1 message Oct 20, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: list_lru: mark expected switch fall-through

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

---
This code was tested by compilation only (GCC 7.2.0 was used). Please, verify if the actual intention of the code is to fall through.

 mm/list_lru.c | 1 +
 1 file changed, 1 insertion(+)
mm/list_lru.c +1 -0
index f8c7de8..278db98 100644
@@ -222,6 +222,7 @@ __list_lru_walk_one(struct list_lru *lru, int nid, int memcg_idx,
 		switch (ret) {
 		case LRU_REMOVED_RETRY:
 			assert_spin_locked(&nlru->lock);
+			/* fall through */
 		case LRU_REMOVED:
 			isolated++;
 			nlru->nr_items--;
Signature · 7 lines
2.7.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>