]> git.baikalelectronics.ru Git - kernel.git/commit
vsprintf: add printk specifier %px
authorTobin C. Harding <me@tobin.cc>
Wed, 22 Nov 2017 23:59:45 +0000 (10:59 +1100)
committerTobin C. Harding <me@tobin.cc>
Wed, 29 Nov 2017 01:13:14 +0000 (12:13 +1100)
commit47c8fc7be244b69a3c210e14996584872c6277b6
treecdd958371ba49a69d64aae5df68ac0f181ba945d
parentc50104c2c22fe576ffaa034b64e39a423f4548de
vsprintf: add printk specifier %px

printk specifier %p now hashes all addresses before printing. Sometimes
we need to see the actual unmodified address. This can be achieved using
%lx but then we face the risk that if in future we want to change the
way the Kernel handles printing of pointers we will have to grep through
the already existent 50 000 %lx call sites. Let's add specifier %px as a
clear, opt-in, way to print a pointer and maintain some level of
isolation from all the other hex integer output within the Kernel.

Add printk specifier %px to print the actual unmodified address.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Documentation/printk-formats.txt
lib/vsprintf.c
scripts/checkpatch.pl