lkml.org 
[lkml]   [2020]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/8] sched: Fix some style issues in test_coresched.c
Date
Line 825: open brace '{' following function definitions go
on the next line.
Line 459: that open brace { should be on the previous line
Line 459: space required before the open parenthesis '('

Issues reported by checkpatch.

There are other issues including over a hundred instances of using spaces
instead of tabs in this file.
I am currently fixing these specific issues in this patch.

Signed-off-by: John B. Wyatt IV <jbwyatt4@gmail.com>
---
tools/testing/selftests/sched/test_coresched.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/testing/selftests/sched/test_coresched.c b/tools/testing/selftests/sched/test_coresched.c
index 91cfb00f15b5..f11ed8370c07 100644
--- a/tools/testing/selftests/sched/test_coresched.c
+++ b/tools/testing/selftests/sched/test_coresched.c
@@ -459,9 +459,8 @@ char *get_task_core_cookie(char *pid)
sprintf(proc_path, "/proc/%s/sched", pid);

fp = fopen(proc_path, "r");
- while ((fgets(line, 1024, fp)) != NULL)
- {
- if(!strstr(line, "core_cookie"))
+ while ((fgets(line, 1024, fp)) != NULL) {
+ if (!strstr(line, "core_cookie"))
continue;

for (j = 0, i = 0; i < 1024 && line[i] != '\0'; i++)
@@ -826,7 +825,8 @@ static void test_prctl_in_group(char *root)
print_pass();
}

-int main(void) {
+int main(void)
+{
char *root = make_group(NULL, NULL);

test_cgroup_parent_tag_child_inherit(root);
--
2.28.0
\
 
 \ /
  Last update: 2020-10-29 03:13    [W:0.211 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site