public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Tuomas Tynkkynen <tuomas.tynkkynen-X3B1VOXEql0@public.gmane.org>
To: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] pinctrl: Cleanup string initializations (char[] instead of char *)
Date: Sat, 17 May 2014 15:36:40 +0000 (UTC)	[thread overview]
Message-ID: <loom.20140517T173525-130@post.gmane.org> (raw)
In-Reply-To: 1400337445-25750-1-git-send-email-manuel.schoelling@gmx.de

Manuel Schölling <manuel.schoelling@...> writes:

> 
> Initializations like 'char *foo = "bar"' will create two variables: a 
static
> string and a pointer (foo) to that static string. Instead 'char foo[] = 
"bar"'
> will declare a single variable and will end up in shorter
> assembly (according to Jeff Garzik on the KernelJanitor's TODO list).
> 

For globals this might be the case, but for function locals this is
actually more code since the string now needs to be copied to the stack.

  reply	other threads:[~2014-05-17 15:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-17 14:37 [PATCH] pinctrl: Cleanup string initializations (char[] instead of char *) Manuel Schölling
2014-05-17 15:36 ` Tuomas Tynkkynen [this message]
     [not found] ` <1400337445-25750-1-git-send-email-manuel.schoelling-Mmb7MZpHnFY@public.gmane.org>
2014-05-17 21:24   ` Thierry Reding
2014-05-22 21:57 ` Linus Walleij

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=loom.20140517T173525-130@post.gmane.org \
    --to=tuomas.tynkkynen-x3b1voxeql0@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.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