diff options
author | Andy Shevchenko <[email protected]> | 2016-01-15 16:59:18 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2016-01-16 11:17:30 -0800 |
commit | 3cab1e711297c4fbc526ca9b802ef61894c06545 (patch) | |
tree | 3fd41a80dd0a0bb4fbd6ef2c8174b402795244c8 /tools/perf/scripts/python/Perf-Trace-Util | |
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 <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Cc: Joe Perches <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util')
0 files changed, 0 insertions, 0 deletions