[lkml]   [2012]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC][PATCH] printk: Add %pb to print bitmaps
    On Wed, May 9, 2012 at 6:27 AM, Peter Zijlstra <> wrote:
    > + * - 'b' For a bitmap, consumes 2 args, second is int
    > + * - 'bc' For a cpumask
    > + * - 'bn' For a nodemask

    Hard NAK.

    No way. The "consumes 2 args" is fundamentally idiotic, since it
    forces compiler warnings. The whole idea of %pXX was that you can give
    it any pointer, because all that the compiler cares about is the "%p"
    part, so random pointers to stuff won't break.

    Your patch breaks the whole point of the extension.

    The "bc" and "bn" would work, except for the fact that I doubt they
    are printed out enough to matter.

    A "%.*pb" is the only interface that can work for a "sized" bitmap
    (with obviously fixed-length ones being possible with a "%.32bp" like

    But the whole va_args games you play are not acceptable. %p *will*
    continue to take a void *, and nothing else.


     \ /
      Last update: 2012-05-09 19:41    [W:0.037 / U:18.168 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site