From: Colin King <colin.king@canonical.com>
To: Thomas Winischhofer <thomas@winischhofer.net>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] video: fbdev: sis: make const array specialtv static, reduces object code size
Date: Wed, 13 Sep 2017 15:41:37 +0000 [thread overview]
Message-ID: <20170913154137.6886-1-colin.king@canonical.com> (raw)
From: Colin Ian King <colin.king@canonical.com>
Don't populate the const array specialtv on the stack, instead make it
static. Makes the object code smaller by over 1100 bytes:
Before:
text data bss dec hex filename
179899 7504 0 187403 2dc0b drivers/video/fbdev/sis/init301.o
After:
text data bss dec hex filename
178720 7568 0 186288 2d7b0 drivers/video/fbdev/sis/init301.o
(gcc version 7.2.0, x86_64)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/video/fbdev/sis/init301.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/sis/init301.c b/drivers/video/fbdev/sis/init301.c
index 1ec9c3e0e1d8..02ee752d5000 100644
--- a/drivers/video/fbdev/sis/init301.c
+++ b/drivers/video/fbdev/sis/init301.c
@@ -6486,7 +6486,7 @@ SiS_SetTVSpecial(struct SiS_Private *SiS_Pr, unsigned short ModeNo)
if(!(SiS_Pr->SiS_TVMode & TVSetPAL)) {
if(SiS_Pr->SiS_TVMode & TVSetNTSC1024) {
- const unsigned char specialtv[] = {
+ static const unsigned char specialtv[] = {
0xa7,0x07,0xf2,0x6e,0x17,0x8b,0x73,0x53,
0x13,0x40,0x34,0xf4,0x63,0xbb,0xcc,0x7a,
0x58,0xe4,0x73,0xda,0x13
--
2.14.1
next reply other threads:[~2017-09-13 15:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170913154142epcas2p41e38ee4285ed856ee6b98edf267da1de@epcas2p4.samsung.com>
2017-09-13 15:41 ` Colin King [this message]
2017-10-12 15:30 ` [PATCH] video: fbdev: sis: make const array specialtv 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=20170913154137.6886-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 \
--cc=thomas@winischhofer.net \
/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).