Skip to contentSkip to conversation

kernel/sys.c: Convert to use the preferred fallthrough macro

PATCH Applied Miaohe Lin 2 participants 2 messages Aug 14, 2020

lore
Share & tools
lore

Miaohe Lin

author
#0 lore raw

PATCH 1/1 kernel/sys.c: Convert to use the preferred fallthrough macro

Convert the uses of fallthrough comments to fallthrough macro.

---
 kernel/sys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sys.c +1 -1
index ca11af9d815d..ab6c409b1159 100644
@@ -1753,7 +1753,7 @@ void getrusage(struct task_struct *p, int who, struct rusage *r)
 
 		if (who == RUSAGE_CHILDREN)
 			break;
-		/* fall through */
+		fallthrough;
 
 	case RUSAGE_SELF:
 		thread_group_cputime_adjusted(p, &tgutime, &tgstime);
Signature · 1 line
2.19.1
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 4 lines · Miaohe Lin

Convert the uses of fallthrough comments to fallthrough macro.

---

This matches what we have documented in:

Documentation/process/deprecated.rst
Documentation/process/coding-style.rst

I'm going to reference that info in the commit message.

Applied, queueing for post rc1.

Quoted 19 lines
 kernel/sys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sys.c +1 -1
index ca11af9d815d..ab6c409b1159 100644
@@ -1753,7 +1753,7 @@ void getrusage(struct task_struct *p, int who, struct rusage *r)
 
 		if (who == RUSAGE_CHILDREN)
 			break;
-		/* fall through */
+		fallthrough;
 
 	case RUSAGE_SELF:
 		thread_group_cputime_adjusted(p, &tgutime, &tgstime);
Signature · 1 line
2.19.1