From: Linus Torvalds Date: Thu, 19 Dec 2024 19:37:07 +0000 (-0800) Subject: vsnprintf: inline skip_atoi() again X-Git-Tag: v6.14-rc1~221^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f372b2256acbfbbf703cfdfae3d02c5a6c0e1679;p=thirdparty%2Fkernel%2Flinux.git vsnprintf: inline skip_atoi() again At some point skip_atoi() had been marked 'noinline_for_stack', but it turns out that this is now a pessimization, and not inlining it actually results in a stack frame in format decoding due to the call and thus hurts stack usage rather than helping. With the simplistic atoi function inlined, the format decoding now needs no frame at all. Signed-off-by: Linus Torvalds --- diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 9142c8c76f826..617b629c73737 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -160,8 +160,7 @@ long long simple_strtoll(const char *cp, char **endp, unsigned int base) } EXPORT_SYMBOL(simple_strtoll); -static noinline_for_stack -int skip_atoi(const char **s) +static inline int skip_atoi(const char **s) { int i = 0;