]> www.infradead.org Git - users/jedix/linux-maple.git/commit
vsprintf: fix calling convention for format_decode()
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 16 Dec 2024 23:37:06 +0000 (15:37 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 23 Dec 2024 19:18:35 +0000 (11:18 -0800)
commit9e0e6d8a3268e805e061ae8b22f14e37b157102a
treefcca34032469cb7dc5cdd0fc9a5c577860d64861
parent03d23941bf03eecd8560e40238decb1515f264f6
vsprintf: fix calling convention for format_decode()

Every single caller wants to know what the next format location is, but
instead the function returned the length of the processed part and so
every single return statement in the format_decode() function was
instead subtracting the start of the format string.

The callers that that did want to know the length (in addition to the
end of the format processing) already had to save off the start of the
format string anyway.  So this was all just doing extra processing both
on the caller and callee sides.

Just change the calling convention to return the end of the format
processing, making everything simpler (and preparing for yet more
simplification to come).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/vsprintf.c