Messages in this thread Patch in this message | | | From | Andy Shevchenko <> | Subject | [PATCH v1 1/1] vsprintf: Move space out of string literals in fourcc_string() | Date | Mon, 10 Jan 2022 22:55:58 +0200 |
| |
The literals "big-endian" and "little-endian" may be potentially occurred in other places. Dropping space allows compiler to "compress" them by using only a single copy.
Cc: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> ---
Depends on the https://lore.kernel.org/lkml/20220110205049.11696-1-andriy.shevchenko@linux.intel.com/T/#u but not to be critical or fix-like.
lib/vsprintf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index b02f01366acb..5818856d5626 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -1780,7 +1780,8 @@ char *fourcc_string(char *buf, char *end, const u32 *fourcc, *p++ = isascii(c) && isprint(c) ? c : '.'; } - strcpy(p, orig & BIT(31) ? " big-endian" : " little-endian"); + *p++ = ' '; + strcpy(p, orig & BIT(31) ? "big-endian" : "little-endian"); p += strlen(p); *p++ = ' '; -- 2.34.1
| |