From: Philipp Zabel <p.zabel@pengutronix.de>
To: Colin King <colin.king@canonical.com>, dri-devel@lists.freedesktop.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpu: ipu-v3: make const arrays int_reg static, shrinks object size
Date: Mon, 19 Feb 2018 15:15:28 +0100 [thread overview]
Message-ID: <1519049728.3408.18.camel@pengutronix.de> (raw)
In-Reply-To: <20180214184559.8616-1-colin.king@canonical.com>
Hi Colin,
On Wed, 2018-02-14 at 18:45 +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Don't populate the const read-only arrays int_reg on the stack but instead
> make them static. Makes the object code smaller by over 80 bytes:
>
> Before:
> text data bss dec hex filename
> 28024 8936 192 37152 9120 drivers/gpu/ipu-v3/ipu-common.o
>
> After:
> text data bss dec hex filename
> 27794 9080 192 37066 90ca drivers/gpu/ipu-v3/ipu-common.o
>
> (gcc version 7.2.0 x86_64)
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/gpu/ipu-v3/ipu-common.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
> index 658fa2d3e40c..48685cddbad1 100644
> --- a/drivers/gpu/ipu-v3/ipu-common.c
> +++ b/drivers/gpu/ipu-v3/ipu-common.c
> @@ -1089,7 +1089,7 @@ static void ipu_irq_handler(struct irq_desc *desc)
> {
> struct ipu_soc *ipu = irq_desc_get_handler_data(desc);
> struct irq_chip *chip = irq_desc_get_chip(desc);
> - const int int_reg[] = { 0, 1, 2, 3, 10, 11, 12, 13, 14};
> + static const int int_reg[] = { 0, 1, 2, 3, 10, 11, 12, 13, 14};
>
> chained_irq_enter(chip, desc);
>
> @@ -1102,7 +1102,7 @@ static void ipu_err_irq_handler(struct irq_desc *desc)
> {
> struct ipu_soc *ipu = irq_desc_get_handler_data(desc);
> struct irq_chip *chip = irq_desc_get_chip(desc);
> - const int int_reg[] = { 4, 5, 8, 9};
> + static const int int_reg[] = { 4, 5, 8, 9};
>
> chained_irq_enter(chip, desc);
Applied to imx-drm/next, thank you.
regards
Philipp
prev parent reply other threads:[~2018-02-19 14:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 18:45 Colin King
2018-02-19 14:15 ` Philipp Zabel [this message]
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=1519049728.3408.18.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=colin.king@canonical.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®