mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Petr Mladek <pmladek@suse.com>,
	linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>
Subject: Re: [PATCH v1 1/1] vsprintf: Move space out of string literals in fourcc_string()
Date: Tue, 11 Jan 2022 13:28:21 +0200	[thread overview]
Message-ID: <Yd1p1XckKtdPyKSr@smile.fi.intel.com> (raw)
In-Reply-To: <308b7158-7c2a-cc98-6091-14dae2b2cbba@rasmusvillemoes.dk>

On Tue, Jan 11, 2022 at 11:26:21AM +0100, Rasmus Villemoes wrote:
> On 10/01/2022 21.55, Andy Shevchenko wrote:
> > 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.
> 
> Nit: it's not the compiler which does that, but the linker.

Ah, I stand corrected, thanks!

> > -	strcpy(p, orig & BIT(31) ? " big-endian" : " little-endian");
> > +	*p++ = ' ';
> > +	strcpy(p, orig & BIT(31) ? "big-endian" : "little-endian");
> >  	p += strlen(p);
> 
> Hm, ok, those two strings do occur a lot with of_property_read_bool()
> and friends. But if you're micro-optimizing anyway, why not drop the
> strlen() and say p = stpcpy(...) instead?

Why not? I'll do it for v2.

Any thoughts / comments on the
https://lore.kernel.org/lkml/20220110205049.11696-1-andriy.shevchenko@linux.intel.com/T/#u?
I'm asking since dependency and I would like to know if we still want that
fix or not.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2022-01-11 11:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 20:55 Andy Shevchenko
2022-01-10 22:13 ` Sakari Ailus
2022-01-11 10:26 ` Rasmus Villemoes
2022-01-11 11:28   ` Andy Shevchenko [this message]
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=Yd1p1XckKtdPyKSr@smile.fi.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