linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] video: fbdev: sis: make const array specialtv static, reduces object code size
@ 2017-09-13 15:41 ` Colin King
  2017-10-12 15:30   ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-09-13 15:41 UTC (permalink / raw)
  To: Thomas Winischhofer, Bartlomiej Zolnierkiewicz, linux-fbdev; +Cc: linux-kernel

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] video: fbdev: sis: make const array specialtv static, reduces object code size
  2017-09-13 15:41 ` [PATCH] video: fbdev: sis: make const array specialtv static, reduces object code size Colin King
@ 2017-10-12 15:30   ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-10-12 15:30 UTC (permalink / raw)
  To: Colin King; +Cc: Thomas Winischhofer, linux-fbdev, linux-kernel, dri-devel

On Wednesday, September 13, 2017 04:41:37 PM Colin King wrote:
> 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>

Patch queued for 4.15, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-12 15:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170913154142epcas2p41e38ee4285ed856ee6b98edf267da1de@epcas2p4.samsung.com>
2017-09-13 15:41 ` [PATCH] video: fbdev: sis: make const array specialtv static, reduces object code size Colin King
2017-10-12 15:30   ` Bartlomiej Zolnierkiewicz

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).