From patchwork Wed Sep 13 15:41:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 9951559 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 87BEE60360 for ; Wed, 13 Sep 2017 15:42:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 79006284E4 for ; Wed, 13 Sep 2017 15:42:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 776F62876F; Wed, 13 Sep 2017 15:42:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8FD3E28CD7 for ; Wed, 13 Sep 2017 15:41:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751388AbdIMPlm (ORCPT ); Wed, 13 Sep 2017 11:41:42 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:39286 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751075AbdIMPlm (ORCPT ); Wed, 13 Sep 2017 11:41:42 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1ds9nF-0005xt-Ss; Wed, 13 Sep 2017 15:41:37 +0000 From: Colin King To: Thomas Winischhofer , Bartlomiej Zolnierkiewicz , 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 16:41:37 +0100 Message-Id: <20170913154137.6886-1-colin.king@canonical.com> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Colin Ian King 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 --- 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