2020-10-29 10:01:14

by John B. Wyatt IV

[permalink] [raw]
Subject: [PATCH 0/8] Style and small fixes for core-scheduling

Patchset of style and small fixes for the 8th iteration of the
Core-Scheduling feature.

Style fixes include changing spaces to tabs, inserting new lines before
declarations, removing unused braces, and spelling.

Two small fixes involving changing a main() to main(void) and removing an
unused 'else'.

All issues were reported by checkpatch.

I am a new Linux kernel developer interning with the Outreachy project.

Please feel free to advise on any corrections or improvements that can be
made.

John B. Wyatt IV (8):
sched: Correct misspellings in core-scheduling.rst
sched: Fix bad function definition
sched: Fix some style issues in test_coresched.c
sched: Remove unused else
sched: Add newline after declaration
sched: Remove unneeded braces
sched: Replace spaces with tabs
sched: Add newlines after declarations

Documentation/admin-guide/hw-vuln/core-scheduling.rst | 8 ++++----
arch/x86/include/asm/thread_info.h | 4 ++--
kernel/sched/core.c | 6 ++++--
kernel/sched/coretag.c | 3 ++-
tools/testing/selftests/sched/test_coresched.c | 8 ++++----
5 files changed, 16 insertions(+), 13 deletions(-)

--
2.28.0


2020-10-29 10:01:18

by John B. Wyatt IV

[permalink] [raw]
Subject: [PATCH 4/8] sched: Remove unused else

Silences suspect code warning.

Issue reported by checkpatch.

Signed-off-by: John B. Wyatt IV <[email protected]>
---
kernel/sched/coretag.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/coretag.c b/kernel/sched/coretag.c
index 3333c9b0afc5..11139dbed648 100644
--- a/kernel/sched/coretag.c
+++ b/kernel/sched/coretag.c
@@ -146,7 +146,7 @@ int sched_core_share_tasks(struct task_struct *t1, struct task_struct *t2)
}
wr.tasks[0] = t1;
wr.cookies[0] = cookie;
- } else
+ }
/*
* t1 joining t2
* CASE 1:
--
2.28.0

2020-10-29 10:02:03

by John B. Wyatt IV

[permalink] [raw]
Subject: [PATCH 6/8] sched: Remove unneeded braces

Remove unneeded braces and the spaces for the bottom brace to silence
checkpatch warnings.

Issue reported by checkpatch.

Signed-off-by: John B. Wyatt IV <[email protected]>
---
kernel/sched/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 61758b5478d8..7bf20110fdf5 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3588,9 +3588,9 @@ int sched_fork(unsigned long clone_flags, struct task_struct *p)
if (current->core_task_cookie) {

/* If it is not CLONE_THREAD fork, assign a unique per-task tag. */
- if (!(clone_flags & CLONE_THREAD)) {
+ if (!(clone_flags & CLONE_THREAD))
return sched_core_share_tasks(p, p);
- }
+
/* Otherwise share the parent's per-task tag. */
return sched_core_share_tasks(p, current);
}
--
2.28.0