Re: [PATCH v10 tip/sched/core 6/6] sched/debug: Introduce per-CPU debugfs files
From: K Prateek Nayak
Date: Fri Oct 30 2026 - 02:05:41 EST
Hello Aaron,
On 10/30/2026 7:08 AM, Aaron Tomlin wrote:
> +static __init void debugfs_cpu_init(void)
> +{
> + struct dentry *d_cpu_dir;
> + unsigned long cpu;
> + char buf[16];
> +
> + d_cpu_dir = debugfs_create_dir("cpu", debugfs_sched);
Missing an error handling here in case this fails?
> +
> + for_each_possible_cpu(cpu) {
> + struct dentry *d_cpu;
> +
> + snprintf(buf, sizeof(buf), "cpu%lu", cpu);
> + d_cpu = debugfs_create_dir(buf, d_cpu_dir);
> +
> + debugfs_create_file("debug", 0444, d_cpu, (void *) cpu, &sched_debug_cpu_fops);
> + }
> +}
--
Thanks and Regards,
Prateek