Re: [RFC][PATCH] printk: Add %pb to print bitmaps

From: Peter Zijlstra
Date: Wed May 09 2012 - 09:44:47 EST


On Wed, 2012-05-09 at 15:36 +0200, Ingo Molnar wrote:
> * Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> > @@ -857,15 +860,19 @@ int kptr_restrict __read_mostly;
> > * correctness of the format string and va_list arguments.
> > * - 'K' For a kernel pointer that should be hidden from unprivileged users
> > * - 'NF' For a netdev_features_t
> > + * - 'b' For a bitmap, consumes 2 args, second is int
>
> hm, won't the second arg confuse gcc's printf format checker?


Ah, yes, I suppose I could abuse something like %*pb. Let me try that.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/