Skip to content

Commit 1a3fcf4

Browse files
akpm00sfrothwell
authored andcommitted
psi-cgroup-support-checkpatch-fixes
WARNING: please, no spaces at the start of a line torvalds#250: FILE: kernel/cgroup/cgroup.c:4554: + {$ ERROR: code indent should use tabs where possible torvalds#251: FILE: kernel/cgroup/cgroup.c:4555: + .name = "cpu.pressure",$ WARNING: please, no spaces at the start of a line torvalds#251: FILE: kernel/cgroup/cgroup.c:4555: + .name = "cpu.pressure",$ ERROR: code indent should use tabs where possible torvalds#252: FILE: kernel/cgroup/cgroup.c:4556: + .flags = CFTYPE_NOT_ON_ROOT,$ WARNING: please, no spaces at the start of a line torvalds#252: FILE: kernel/cgroup/cgroup.c:4556: + .flags = CFTYPE_NOT_ON_ROOT,$ ERROR: code indent should use tabs where possible torvalds#253: FILE: kernel/cgroup/cgroup.c:4557: + .seq_show = cgroup_cpu_pressure_show,$ WARNING: please, no spaces at the start of a line torvalds#253: FILE: kernel/cgroup/cgroup.c:4557: + .seq_show = cgroup_cpu_pressure_show,$ WARNING: please, no spaces at the start of a line torvalds#254: FILE: kernel/cgroup/cgroup.c:4558: + },$ WARNING: please, no spaces at the start of a line torvalds#255: FILE: kernel/cgroup/cgroup.c:4559: + {$ ERROR: code indent should use tabs where possible torvalds#256: FILE: kernel/cgroup/cgroup.c:4560: + .name = "memory.pressure",$ WARNING: please, no spaces at the start of a line torvalds#256: FILE: kernel/cgroup/cgroup.c:4560: + .name = "memory.pressure",$ ERROR: code indent should use tabs where possible torvalds#257: FILE: kernel/cgroup/cgroup.c:4561: + .flags = CFTYPE_NOT_ON_ROOT,$ WARNING: please, no spaces at the start of a line torvalds#257: FILE: kernel/cgroup/cgroup.c:4561: + .flags = CFTYPE_NOT_ON_ROOT,$ ERROR: code indent should use tabs where possible torvalds#258: FILE: kernel/cgroup/cgroup.c:4562: + .seq_show = cgroup_memory_pressure_show,$ WARNING: please, no spaces at the start of a line torvalds#258: FILE: kernel/cgroup/cgroup.c:4562: + .seq_show = cgroup_memory_pressure_show,$ WARNING: please, no spaces at the start of a line torvalds#259: FILE: kernel/cgroup/cgroup.c:4563: + },$ WARNING: please, no spaces at the start of a line torvalds#260: FILE: kernel/cgroup/cgroup.c:4564: + {$ ERROR: code indent should use tabs where possible torvalds#261: FILE: kernel/cgroup/cgroup.c:4565: + .name = "io.pressure",$ WARNING: please, no spaces at the start of a line torvalds#261: FILE: kernel/cgroup/cgroup.c:4565: + .name = "io.pressure",$ ERROR: code indent should use tabs where possible torvalds#262: FILE: kernel/cgroup/cgroup.c:4566: + .flags = CFTYPE_NOT_ON_ROOT,$ WARNING: please, no spaces at the start of a line torvalds#262: FILE: kernel/cgroup/cgroup.c:4566: + .flags = CFTYPE_NOT_ON_ROOT,$ ERROR: code indent should use tabs where possible torvalds#263: FILE: kernel/cgroup/cgroup.c:4567: + .seq_show = cgroup_io_pressure_show,$ WARNING: please, no spaces at the start of a line torvalds#263: FILE: kernel/cgroup/cgroup.c:4567: + .seq_show = cgroup_io_pressure_show,$ WARNING: please, no spaces at the start of a line torvalds#264: FILE: kernel/cgroup/cgroup.c:4568: + },$ WARNING: please, no spaces at the start of a line torvalds#322: FILE: kernel/sched/psi.c:424: + cgroup = task->cgroups->dfl_cgrp;$ WARNING: please, no spaces at the start of a line torvalds#323: FILE: kernel/sched/psi.c:425: + while (cgroup && (parent = cgroup_parent(cgroup))) {$ WARNING: suspect code indent for conditional statements (7, 15) torvalds#323: FILE: kernel/sched/psi.c:425: + while (cgroup && (parent = cgroup_parent(cgroup))) { + struct psi_group *group; ERROR: code indent should use tabs where possible torvalds#324: FILE: kernel/sched/psi.c:426: + struct psi_group *group;$ WARNING: please, no spaces at the start of a line torvalds#324: FILE: kernel/sched/psi.c:426: + struct psi_group *group;$ ERROR: code indent should use tabs where possible torvalds#326: FILE: kernel/sched/psi.c:428: + group = cgroup_psi(cgroup);$ WARNING: please, no spaces at the start of a line torvalds#326: FILE: kernel/sched/psi.c:428: + group = cgroup_psi(cgroup);$ ERROR: code indent should use tabs where possible torvalds#327: FILE: kernel/sched/psi.c:429: + psi_group_change(group, cpu, now, clear, set);$ WARNING: please, no spaces at the start of a line torvalds#327: FILE: kernel/sched/psi.c:429: + psi_group_change(group, cpu, now, clear, set);$ ERROR: code indent should use tabs where possible torvalds#329: FILE: kernel/sched/psi.c:431: + cgroup = parent;$ WARNING: please, no spaces at the start of a line torvalds#329: FILE: kernel/sched/psi.c:431: + cgroup = parent;$ WARNING: please, no spaces at the start of a line torvalds#330: FILE: kernel/sched/psi.c:432: + }$ WARNING: braces {} are not necessary for any arm of this statement torvalds#378: FILE: kernel/sched/psi.c:537: + if (task_on_rq_queued(task)) { [...] + } else if (task->in_iowait) { [...] total: 13 errors, 24 warnings, 334 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. NOTE: Whitespace errors detected. You may wish to use scripts/cleanpatch or scripts/cleanfile ./patches/psi-cgroup-support.patch has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Johannes Weiner <jweiner@fb.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
1 parent 6e4efc3 commit 1a3fcf4

File tree

2 files changed

+24
-25
lines changed

2 files changed

+24
-25
lines changed

kernel/cgroup/cgroup.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4551,21 +4551,21 @@ static struct cftype cgroup_base_files[] = {
45514551
.seq_show = cpu_stat_show,
45524552
},
45534553
#ifdef CONFIG_PSI
4554-
{
4555-
.name = "cpu.pressure",
4556-
.flags = CFTYPE_NOT_ON_ROOT,
4557-
.seq_show = cgroup_cpu_pressure_show,
4558-
},
4559-
{
4560-
.name = "memory.pressure",
4561-
.flags = CFTYPE_NOT_ON_ROOT,
4562-
.seq_show = cgroup_memory_pressure_show,
4563-
},
4564-
{
4565-
.name = "io.pressure",
4566-
.flags = CFTYPE_NOT_ON_ROOT,
4567-
.seq_show = cgroup_io_pressure_show,
4568-
},
4554+
{
4555+
.name = "cpu.pressure",
4556+
.flags = CFTYPE_NOT_ON_ROOT,
4557+
.seq_show = cgroup_cpu_pressure_show,
4558+
},
4559+
{
4560+
.name = "memory.pressure",
4561+
.flags = CFTYPE_NOT_ON_ROOT,
4562+
.seq_show = cgroup_memory_pressure_show,
4563+
},
4564+
{
4565+
.name = "io.pressure",
4566+
.flags = CFTYPE_NOT_ON_ROOT,
4567+
.seq_show = cgroup_io_pressure_show,
4568+
},
45694569
#endif
45704570
{ } /* terminate */
45714571
};

kernel/sched/psi.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -422,15 +422,15 @@ void psi_task_change(struct task_struct *task, u64 now, int clear, int set)
422422
psi_group_change(&psi_system, cpu, now, clear, set);
423423

424424
#ifdef CONFIG_CGROUPS
425-
cgroup = task->cgroups->dfl_cgrp;
426-
while (cgroup && (parent = cgroup_parent(cgroup))) {
427-
struct psi_group *group;
425+
cgroup = task->cgroups->dfl_cgrp;
426+
while (cgroup && (parent = cgroup_parent(cgroup))) {
427+
struct psi_group *group;
428428

429-
group = cgroup_psi(cgroup);
430-
psi_group_change(group, cpu, now, clear, set);
429+
group = cgroup_psi(cgroup);
430+
psi_group_change(group, cpu, now, clear, set);
431431

432-
cgroup = parent;
433-
}
432+
cgroup = parent;
433+
}
434434
#endif
435435
}
436436

@@ -535,11 +535,10 @@ void cgroup_move_task(struct task_struct *task, struct css_set *to)
535535

536536
rq = task_rq_lock(task, &rf);
537537

538-
if (task_on_rq_queued(task)) {
538+
if (task_on_rq_queued(task))
539539
task_flags = TSK_RUNNING;
540-
} else if (task->in_iowait) {
540+
else if (task->in_iowait)
541541
task_flags = TSK_IOWAIT;
542-
}
543542
if (task->flags & PF_MEMSTALL)
544543
task_flags |= TSK_MEMSTALL;
545544

0 commit comments

Comments
 (0)