From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Petr Mladek <pmladek@suse.com>, linux-kernel@vger.kernel.org
Cc: Steven Rostedt <rostedt@goodmis.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Sakari Ailus <sakari.ailus@linux.intel.com>
Subject: [PATCH v1 1/1] vsprintf: Move space out of string literals in fourcc_string()
Date: Mon, 10 Jan 2022 22:55:58 +0200 [thread overview]
Message-ID: <20220110205558.11876-1-andriy.shevchenko@linux.intel.com> (raw)
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
next reply other threads:[~2022-01-10 20:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-10 20:55 Andy Shevchenko [this message]
2022-01-10 22:13 ` Sakari Ailus
2022-01-11 10:26 ` Rasmus Villemoes
2022-01-11 11:28 ` Andy Shevchenko
2022-01-11 15:10 ` Petr Mladek
2022-01-11 16:14 ` Rasmus Villemoes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220110205558.11876-1-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sakari.ailus@linux.intel.com \
--cc=senozhatsky@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome