[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120509120745.042e86c6.akpm@linux-foundation.org>
Date: Wed, 9 May 2012 12:07:45 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Igor Mammedov <imammedo@...hat.com>, Jiang Liu <liuj97@...il.com>,
linux-kernel@...r.kernel.org, mingo@...nel.org, pjt@...gle.com,
tglx@...utronix.de, seto.hidetoshi@...fujitsu.com,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [RFC][PATCH] printk: Add %pb to print bitmaps
On Wed, 09 May 2012 15:27:23 +0200
Peter Zijlstra <peterz@...radead.org> wrote:
> + * - 'b' For a bitmap, consumes 2 args, second is int
There's a pretty widespread convention that %b is used to print in
binary: printf("%b", 10) -> 1010. Regrettably it isn't part of
standard C, but it's often supported anyway. Perl's printf does this
as well. Perl uses %B also.
If we later want to add binary printing to kernel print(), we'd presumably
use %pb, to match this precedent.
So perhaps it would be better to avoid consuming `b' for bitmaps?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists