]> git.baikalelectronics.ru Git - kernel.git/commit
lib/kstrtox.c: smaller _parse_integer()
authorAlexey Dobriyan <adobriyan@gmail.com>
Tue, 11 Oct 2016 20:51:32 +0000 (13:51 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 11 Oct 2016 22:06:30 +0000 (15:06 -0700)
commitd6fd9f10d5a4143bb079e0b1d781eec904604957
tree214e9634190641a501cab0393580394a3b4f7eb9
parent8ff877179947e8d05aab5445acb99129fce3f935
lib/kstrtox.c: smaller _parse_integer()

Set "overflow" bit upon encountering it instead of postponing to the end
of the conversion. Somehow gcc unwedges itself and generates better code:

$ ./scripts/bloat-o-meter ../vmlinux-000 ../obj/vmlinux
_parse_integer                      177     139     -38

Inspired by patch from Zhaoxiu Zeng.

Link: http://lkml.kernel.org/r/20160826221920.GA1909@p183.telecom.by
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>
lib/kstrtox.c