From: Oleg Nesterov Date: Wed, 3 Jul 2013 22:08:19 +0000 (-0700) Subject: coredump: cn_vprintf() has no reason to call vsnprintf() twice X-Git-Tag: omap-for-v3.11/fixes-for-merge-window~17^2~53 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fe9d8ca21cc1517258fe448639392d5d542eec6;p=pandora-kernel.git coredump: cn_vprintf() has no reason to call vsnprintf() twice cn_vprintf() looks really overcomplicated and sub-optimal. We do not need vsnprintf(NULL) to calculate the size we need, we can simply try to print into the current buffer and expand/retry only if necessary. Signed-off-by: Oleg Nesterov Cc: Andi Kleen Cc: Colin Walters Cc: Denys Vlasenko Cc: Jiri Slaby Cc: Lennart Poettering Cc: Lucas De Marchi Acked-by: Neil Horman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed