]> git.baikalelectronics.ru Git - kernel.git/commit
vsprintf: neaten %pK kptr_restrict, save a bit of code space
authorJoe Perches <joe@perches.com>
Tue, 22 Mar 2011 23:34:19 +0000 (16:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Mar 2011 00:44:12 +0000 (17:44 -0700)
commit3e26c6cdc370d6f00b170ce1e987eacc6dd926e2
treeb0fbb98f7d25c5aa18f972cbcddb1c81035e387c
parent70405bad0cabea87de964e0a9dd5b20163e49267
vsprintf: neaten %pK kptr_restrict, save a bit of code space

If kptr restrictions are on, just set the passed pointer to NULL.

$ size lib/vsprintf.o.*
   text    data     bss     dec     hex filename
   8247       4       2    8253    203d lib/vsprintf.o.new
   8282       4       2    8288    2060 lib/vsprintf.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Dan Rosenberg <drosenberg@vsecurity.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/vsprintf.c