From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Colin King <colin.king@canonical.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Lukas Wunner <lukas@wunner.de>,
Bjorn Helgaas <bhelgaas@google.com>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/platform/intel-mid: make several arrays static, makes code smaller
Date: Fri, 25 Aug 2017 16:53:35 +0000 [thread overview]
Message-ID: <1503680015.25945.113.camel@linux.intel.com> (raw)
In-Reply-To: <20170825163206.23250-1-colin.king@canonical.com>
On Fri, 2017-08-25 at 17:32 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Don't populate arrays on the stack, instead make them static .
> Makes the object code smaller by 76 bytes:
>
> Before:
> text data bss dec hex
> filename
> 4217 1540 128 5885 16fd
> arch/x86/platform/intel-mid/pwr.o
>
> After:
> text data bss dec hex
> filename
> 3981 1700 128 5809 16b1
> arch/x86/platform/intel-mid/pwr.o
Fine by me.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> arch/x86/platform/intel-mid/pwr.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/platform/intel-mid/pwr.c
> b/arch/x86/platform/intel-mid/pwr.c
> index ef03852ea6e8..49ec5b94c71f 100644
> --- a/arch/x86/platform/intel-mid/pwr.c
> +++ b/arch/x86/platform/intel-mid/pwr.c
> @@ -444,7 +444,7 @@ static int mid_set_initial_state(struct mid_pwr
> *pwr, const u32 *states)
> static int pnw_set_initial_state(struct mid_pwr *pwr)
> {
> /* On Penwell SRAM must stay powered on */
> - const u32 states[] = {
> + static const u32 states[] = {
> 0xf00fffff, /* PM_SSC(0) */
> 0xffffffff, /* PM_SSC(1) */
> 0xffffffff, /* PM_SSC(2) */
> @@ -455,7 +455,7 @@ static int pnw_set_initial_state(struct mid_pwr
> *pwr)
>
> static int tng_set_initial_state(struct mid_pwr *pwr)
> {
> - const u32 states[] = {
> + static const u32 states[] = {
> 0xffffffff, /* PM_SSC(0) */
> 0xffffffff, /* PM_SSC(1) */
> 0xffffffff, /* PM_SSC(2) */
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Colin King <colin.king@canonical.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Lukas Wunner <lukas@wunner.de>,
Bjorn Helgaas <bhelgaas@google.com>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/platform/intel-mid: make several arrays static, makes code smaller
Date: Fri, 25 Aug 2017 19:53:35 +0300 [thread overview]
Message-ID: <1503680015.25945.113.camel@linux.intel.com> (raw)
In-Reply-To: <20170825163206.23250-1-colin.king@canonical.com>
On Fri, 2017-08-25 at 17:32 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Don't populate arrays on the stack, instead make them static .
> Makes the object code smaller by 76 bytes:
>
> Before:
> text data bss dec hex
> filename
> 4217 1540 128 5885 16fd
> arch/x86/platform/intel-mid/pwr.o
>
> After:
> text data bss dec hex
> filename
> 3981 1700 128 5809 16b1
> arch/x86/platform/intel-mid/pwr.o
Fine by me.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> arch/x86/platform/intel-mid/pwr.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/platform/intel-mid/pwr.c
> b/arch/x86/platform/intel-mid/pwr.c
> index ef03852ea6e8..49ec5b94c71f 100644
> --- a/arch/x86/platform/intel-mid/pwr.c
> +++ b/arch/x86/platform/intel-mid/pwr.c
> @@ -444,7 +444,7 @@ static int mid_set_initial_state(struct mid_pwr
> *pwr, const u32 *states)
> static int pnw_set_initial_state(struct mid_pwr *pwr)
> {
> /* On Penwell SRAM must stay powered on */
> - const u32 states[] = {
> + static const u32 states[] = {
> 0xf00fffff, /* PM_SSC(0) */
> 0xffffffff, /* PM_SSC(1) */
> 0xffffffff, /* PM_SSC(2) */
> @@ -455,7 +455,7 @@ static int pnw_set_initial_state(struct mid_pwr
> *pwr)
>
> static int tng_set_initial_state(struct mid_pwr *pwr)
> {
> - const u32 states[] = {
> + static const u32 states[] = {
> 0xffffffff, /* PM_SSC(0) */
> 0xffffffff, /* PM_SSC(1) */
> 0xffffffff, /* PM_SSC(2) */
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2017-08-25 16:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-25 16:32 [PATCH] x86/platform/intel-mid: make several arrays static, makes code smaller Colin King
2017-08-25 16:32 ` Colin King
2017-08-25 16:53 ` Andy Shevchenko [this message]
2017-08-25 16:53 ` Andy Shevchenko
2017-08-25 17:51 ` Lukas Wunner
2017-08-25 17:51 ` Lukas Wunner
2017-08-25 17:53 ` Andy Shevchenko
2017-08-25 17:53 ` Andy Shevchenko
2017-08-25 18:13 ` Colin Ian King
2017-08-25 18:13 ` Colin Ian King
2017-08-29 13:06 ` [tip:x86/platform] x86/platform/intel-mid: Make several arrays static, to make " tip-bot for Colin Ian King
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=1503680015.25945.113.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=colin.king@canonical.com \
--cc=hpa@zytor.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.