diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2016-01-15 16:59:18 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-16 11:17:30 -0800 |
commit | 3cab1e711297c4fbc526ca9b802ef61894c06545 (patch) | |
tree | 3fd41a80dd0a0bb4fbd6ef2c8174b402795244c8 /init | |
parent | 64c734be70c0091fa069baf5f2e58db54368f1b3 (diff) |
lib/vsprintf: refactor duplicate code to special_hex_number()
special_hex_number() is a helper to print a fixed size type in a hex
format with '0x' prefix, zero padding, and small letters. In the module
we have already several copies of such code. Consolidate them under
special_hex_number() helper.
There are couple of differences though.
It seems nobody cared about the output in case of CONFIG_KALLSYMS=n,
when printing symbol address, because the asked field width is not
enough to care last 2 characters in the string represantation of the
pointer. Fixed here.
The %pNF specifier used to be allowed with a specific field width,
though there is neither any user of it nor mention the possibility in
the documentation.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions