lkml.org 
[lkml]   [2018]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v10 9/9] cpuset: Allow reporting of sched domain generation info
On Mon, Jun 18, 2018 at 12:14:09PM +0800, Waiman Long wrote:
> +#ifdef CONFIG_DEBUG_KERNEL
> +static inline void debug_print_domains(cpumask_var_t *doms, int ndoms)
> +{
> + int i;
> + char buf[200];
> + char *ptr, *end = buf + sizeof(buf) - 1;
> +
> + for (i = 0, ptr = buf, *end = '\0'; i < ndoms; i++)
> + ptr += snprintf(ptr, end - ptr, "dom%d=%*pbl ", i,
> + cpumask_pr_args(doms[i]));
> +
> + pr_debug("Generated %d domains: %s\n", ndoms, buf);
> +}

Why not use pr_cont() and do away with that static buffer?

\
 
 \ /
  Last update: 2018-06-20 16:21    [W:0.838 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site