Skip to contentSkip to conversation

sched: label attributes require a ';'

PATCH New Norbert Manthey 2 participants 2 messages Feb 27, 2018 – Mar 9, 2018 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched: label attributes require a ';'

Due to using gcc defines for configuration, some labels might be unused in certain configurations. While adding a __maybe_unused to the label is fine in general, the line has to be terminated with ';'. This is also reflected in the gcc documentation, but gcc parsed the previous variant without an error message.

This has been spotted while compiling with goto-cc, the compiler for the CPROVER tool suite.

---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/fair.c +1 -1
index 26a71eb..3af8fb6 100644
@@ -6716,7 +6716,7 @@ pick_next_task_fair(struct rq *rq, struct task_struct *prev, struct rq_flags *rf
 
 	p = task_of(se);
 
-done: __maybe_unused
+done: __maybe_unused;
 #ifdef CONFIG_SMP
 	/*
 	 * Move the next running task to the front of
Signature · 8 lines
2.7.4

Amazon Development Center Germany GmbH
Berlin - Dresden - Aachen
main office: Krausenstr. 38, 10117 Berlin
Geschaeftsfuehrer: Dr. Ralf Herbrich, Christian Schlaeger
Ust-ID: DE289237879
Eingetragen am Amtsgericht Charlottenburg HRB 149173 B
#1 lore raw

[tip:sched/core] sched/fair: Add ';' after label attributes

sched/fair: Add ';' after label attributes
Commit-ID:  13a453c241b78934a945b1af572d0533612c9bd1
Gitweb:     https://git.kernel.org/tip/13a453c241b78934a945b1af572d0533612c9bd1
Author:     Norbert Manthey <[email protected]>
AuthorDate: Tue, 27 Feb 2018 08:47:40 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 9 Mar 2018 07:59:13 +0100

sched/fair: Add ';' after label attributes

Due to using GCC defines for configuration, some labels might be unused in certain configurations. While adding a __maybe_unused to the label is fine in general, the line has to be terminated with ';'. This is also reflected in the GCC documentation, but GCC parsed the previous variant without an error message.

This has been spotted while compiling with goto-cc, the compiler for the CPROVER tool suite.

---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/fair.c +1 -1
index f5591071ae98..097db34d5ba2 100644
@@ -6797,7 +6797,7 @@ simple:
 
 	p = task_of(se);
 
-done: __maybe_unused
+done: __maybe_unused;
 #ifdef CONFIG_SMP
 	/*
 	 * Move the next running task to the front of