public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] lib/vsprintf: introduce stricter rules for %p extensions
@ 2015-12-29 16:42 Andy Shevchenko
  2015-12-29 16:42 ` [PATCH v2 1/2] lib/vsprintf: refactor duplicate code to special_hex_number() Andy Shevchenko
  2015-12-29 16:42 ` [PATCH v2 2/2] lib/vsprintf: factor out %pN[F] handler as netdev_bits() Andy Shevchenko
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2015-12-29 16:42 UTC (permalink / raw)
  To: Andrew Morton, Rasmus Villemoes, linux-kernel, Joe Perches
  Cc: Andy Shevchenko

Besides the code refactoring we introduce the following rules for %p extensions
here. i.e:

- fixed type extensions are always printed in hex format, prefixed by '0x',
  small letters, full field width on a running architecture (%pa[dp], %pNF)

- fallback to %p based on different kernel configuration will be under the same
  rule set as for fixed types above (%pCn when COMMON_CLK=n, %p[FfSsB] when
  KALLSYMS=n)

- fallback to %p of unimplemented extension will be under the same rule set as
  for fixed types above (%pN)

Since v1:
 - address comments from Joe and Rasmums (might be not all of them)
 - add patch 2
 - desribe in cover letter what is done besides refactoring

Andy Shevchenko (2):
  lib/vsprintf: refactor duplicate code to special_hex_number()
  lib/vsprintf: factor out %pN[F] handler as netdev_bits()

 lib/vsprintf.c | 70 ++++++++++++++++++++++++++++++++--------------------------
 1 file changed, 39 insertions(+), 31 deletions(-)

-- 
2.6.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-12-29 16:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-29 16:42 [PATCH v2 0/2] lib/vsprintf: introduce stricter rules for %p extensions Andy Shevchenko
2015-12-29 16:42 ` [PATCH v2 1/2] lib/vsprintf: refactor duplicate code to special_hex_number() Andy Shevchenko
2015-12-29 16:42 ` [PATCH v2 2/2] lib/vsprintf: factor out %pN[F] handler as netdev_bits() Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox