aboutsummaryrefslogtreecommitdiff
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-05-31 16:26:08 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-31 17:49:27 -0700
commit725fe002d315c2501c110b7245d3eb4f4535f4d6 (patch)
treec68759e4765673eb1f28e220edea40d84d9ff744 /scripts/checkpatch.pl
parentd84970bbaf9a09b3fc60c18ee6d59bc9cb4c3b8a (diff)
vsprintf: correctly handle width when '#' flag used in %#p format
The '%p' output of the kernel's vsprintf() uses spec.field_width to determine how many digits to output based on 2 * sizeof(void*) so that all digits of a pointer are shown. ie. a pointer will be output as "001A2B3C" instead of "1A2B3C". However, if the '#' flag is used in the format (%#p), then the code doesn't take into account the width of the '0x' prefix and will end up outputing "0x1A2B3C" instead of "0x001A2B3C". This patch reworks the "pointer()" format hook to include 2 characters for the '0x' prefix if the '#' flag is included. [akpm@linux-foundation.org: checkpatch fixes] Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/checkpatch.pl')
0 files changed, 0 insertions, 0 deletions