• Mike Travis's avatar
    cpumask: add cpumask_scnprintf_len function · 30ca60c1
    Mike Travis authored
    Add a new function cpumask_scnprintf_len() to return the number of
    characters needed to display "len" cpumask bits.  The current method
    of allocating NR_CPUS bytes is incorrect as what's really needed is
    9 characters per 32-bit word of cpumask bits (8 hex digits plus the
    seperator [','] or the terminating NULL.)  This function provides the
    caller the means to allocate the correct string length.
    
    Cc: Paul Jackson <pj@sgi.com>
    Signed-off-by: default avatarMike Travis <travis@sgi.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    30ca60c1
bitmap.c 24.5 KB