Re: [PATCHv3] x86/intel_rdt: Add cpus_list rdtgroup file

From: Thomas Gleixner
Date: Mon Apr 10 2017 - 05:45:43 EST


On Mon, 10 Apr 2017, Jiri Olsa wrote:
> /* List of all resource groups */
> extern struct list_head rdt_all_groups;
>
> @@ -56,6 +59,7 @@ struct rftype {
> char *name;
> umode_t mode;
> struct kernfs_ops *kf_ops;
> + unsigned long flags;

Lacks update in the kernel-doc comment.

> @@ -182,9 +189,10 @@ static int rdtgroup_cpus_show(struct kernfs_open_file *of,
>
> rdtgrp = rdtgroup_kn_lock_live(of->kn);
>
> - if (rdtgrp)
> - seq_printf(s, "%*pb\n", cpumask_pr_args(&rdtgrp->cpu_mask));
> - else
> + if (rdtgrp) {
> + seq_printf(s, is_list(of) ? "%*pbl\n" : "%*pb\n",
> + cpumask_pr_args(&rdtgrp->cpu_mask));
> + } else
> ret = -ENOENT;

This lacks braces around the else path

> @@ -473,6 +485,14 @@ static int rdtgroup_tasks_show(struct kernfs_open_file *of,
> .seq_show = rdtgroup_cpus_show,
> },
> {
> + .name = "cpus_list",
> + .mode = 0644,
> + .kf_ops = &rdtgroup_kf_single_ops,
> + .write = rdtgroup_cpus_write,
> + .seq_show = rdtgroup_cpus_show,
> + .flags = RFTYPE_FLAGS_CPUS_LIST,
> + },

Please add the new file to Documentation/x86/intel_rdt_ui.txt

Thanks,

tglx