From: Colin King <colin.king@canonical.com>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] drivers/video/fbdev/atyfb: make const arrays static, reduces object code size
Date: Wed, 13 Sep 2017 15:03:09 +0000 [thread overview]
Message-ID: <20170913150309.6250-1-colin.king@canonical.com> (raw)
From: Colin Ian King <colin.king@canonical.com>
Don't populate the const arrays ragepro_tbl and ragexl_tbl on the stack,
instead make them static. Makes the object code smaller by over 380 bytes:
Before:
text data bss dec hex filename
41089 10592 768 52449 cce1 atyfb_base.o
After:
text data bss dec hex filename
40544 10752 768 52064 cb60 atyfb_base.o
(gcc version 7.2.0, x86_64)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/video/fbdev/aty/atyfb_base.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c
index 3ec72f19114b..a9a8272f7a6e 100644
--- a/drivers/video/fbdev/aty/atyfb_base.c
+++ b/drivers/video/fbdev/aty/atyfb_base.c
@@ -2272,10 +2272,10 @@ static void aty_bl_exit(struct backlight_device *bd)
static void aty_calc_mem_refresh(struct atyfb_par *par, int xclk)
{
- const int ragepro_tbl[] = {
+ static const int ragepro_tbl[] = {
44, 50, 55, 66, 75, 80, 100
};
- const int ragexl_tbl[] = {
+ static const int ragexl_tbl[] = {
50, 66, 75, 83, 90, 95, 100, 105,
110, 115, 120, 125, 133, 143, 166
};
--
2.14.1
next reply other threads:[~2017-09-13 15:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170913150314epcas1p4257193707b94242110eb6b9b7a9fdd4b@epcas1p4.samsung.com>
2017-09-13 15:03 ` Colin King [this message]
2017-10-12 15:26 ` [PATCH] drivers/video/fbdev/atyfb: make const arrays static, reduces object code size Bartlomiej Zolnierkiewicz
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=20170913150309.6250-1-colin.king@canonical.com \
--to=colin.king@canonical.com \
--cc=b.zolnierkie@samsung.com \
--cc=linux-fbdev@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