History log of /linux-master/fs/proc/util.c
Revision Date Author Comments
# 81966d83 03-Jan-2019 Eric Biggers <ebiggers@google.com>

fs/proc/util.c: include fs/proc/internal.h for name_to_int()

name_to_int() is defined in fs/proc/util.c and declared in
fs/proc/internal.h, but the declaration isn't included at the point of
the definition. Include the header to enforce that the definition
matches the declaration.

This addresses a gcc warning when -Wmissing-prototypes is enabled.

Link: http://lkml.kernel.org/r/20181115001833.49371-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 0746a0bc 17-Nov-2017 Alexey Dobriyan <adobriyan@gmail.com>

proc: use do-while in name_to_int()

Gcc doesn't know that "len" is guaranteed to be >=1 by dcache and
generates standard while-loop prologue duplicating loop condition.

add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-27 (-27)
function old new delta
name_to_int 104 77 -27

Link: http://lkml.kernel.org/r/20170912195213.GB17730@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 3ee2a199 17-Nov-2017 Alexey Dobriyan <adobriyan@gmail.com>

proc: : uninline name_to_int()

Save ~360 bytes.

add/remove: 1/0 grow/shrink: 0/4 up/down: 104/-463 (-359)
function old new delta
name_to_int - 104 +104
proc_pid_lookup 217 126 -91
proc_lookupfd_common 212 121 -91
proc_task_lookup 289 194 -95
__proc_create 588 402 -186

Link: http://lkml.kernel.org/r/20170912194850.GA17730@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>