From: Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH][RFC] ARM: shmobile: lager: move res/data into init function
Date: Mon, 14 Apr 2014 00:12:26 +0000 [thread overview]
Message-ID: <87y4z822hj.wl%kuninori.morimoto.gx@gmail.com> (raw)
In-Reply-To: <87txa4thq0.wl%kuninori.morimoto.gx@gmail.com>
Hi Geert
> My comment was more about code/size optimizations: if you declare
> du_resources[] as a local (non-static) variable on the stack, the compiler
> has to construct it on the stack. For basic data types (e.g. int, long) this
> requires not that much code (the variable may end up in a register), but
> for more complex structures, the compiler may emit quite some code,
> making it more economic to make the variable static.
> For functions that are called multiple times (which is not the case here),
> there's another reason to use static: the variable on the stack will be
> constructed on every function call, over and over again.
Thank you for explaining about detail of that.
I understood.
But, I wonder is it so big issue ?
Because, these are called only when kernel booting,
and only once.
And, these functions has __init.
Then, what happen after initialization if I add static in local variable ?
Was static variable keeped ? or removed ?
But, anyway, this patch will not be used...
next prev parent reply other threads:[~2014-04-14 0:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-08 7:15 [PATCH][RFC] ARM: shmobile: lager: move res/data into init function Kuninori Morimoto
2014-04-10 19:24 ` Geert Uytterhoeven
2014-04-10 23:07 ` Simon Horman
2014-04-11 0:39 ` Kuninori Morimoto
2014-04-11 0:42 ` Kuninori Morimoto
2014-04-11 9:00 ` Geert Uytterhoeven
2014-04-11 12:23 ` Sergei Shtylyov
2014-04-14 0:12 ` Kuninori Morimoto [this message]
2014-04-14 2:05 ` Simon Horman
2014-04-14 2:08 ` Kuninori Morimoto
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=87y4z822hj.wl%kuninori.morimoto.gx@gmail.com \
--to=kuninori.morimoto.gx@gmail.com \
--cc=linux-sh@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).