On Mon, Feb 01, 2016 at 03:26:28PM -0500, Steven Rostedt wrote:
> +static void *dl_next(struct seq_file *m, void *v, loff_t *pos)
> +{
> +     long cpu = (long)v;
> +
> +     /* to keep from returning zero, v is always cpu + 1 */
> +     cpu--;
> +     cpu = cpumask_next(cpu, cpu_possible_mask);
> +
> +     (*pos)++;
> +
> +     if (cpu >= num_possible_cpus())

And that wants to be: nr_cpu_ids, imagine the bitmap having holes in.

> +             cpu = 0;
> +     else
> +             cpu++;
> +
> +     return (void *)cpu;
> +}

Reply via email to