From patchwork Tue Sep 12 11:45:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 9949049 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 88ED26038F for ; Tue, 12 Sep 2017 11:46:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7ADAE28F40 for ; Tue, 12 Sep 2017 11:46:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F87F28F42; Tue, 12 Sep 2017 11:46:07 +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 EBDA728F41 for ; Tue, 12 Sep 2017 11:46:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751375AbdILLpu (ORCPT ); Tue, 12 Sep 2017 07:45:50 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:40474 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751289AbdILLpt (ORCPT ); Tue, 12 Sep 2017 07:45:49 -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 1drjdS-0007H6-9K; Tue, 12 Sep 2017 11:45:46 +0000 From: Colin King To: Lee Jones , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , linux-fbdev@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] backlight: s6e63m0: make const arrays static, reduces object code size Date: Tue, 12 Sep 2017 12:45:45 +0100 Message-Id: <20170912114545.2131-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 const arrays on the stack, instead make them static. Makes the object code smaller by nearly 400 bytes: Before: text data bss dec hex filename 15164 6336 0 21500 53fc drivers/video/backlight/s6e63m0.o After: text data bss dec hex filename 14669 6432 0 21101 526d drivers/video/backlight/s6e63m0.o Signed-off-by: Colin Ian King --- drivers/video/backlight/s6e63m0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/backlight/s6e63m0.c b/drivers/video/backlight/s6e63m0.c index 3c4a22a3063a..965c660b2f6b 100644 --- a/drivers/video/backlight/s6e63m0.c +++ b/drivers/video/backlight/s6e63m0.c @@ -446,7 +446,7 @@ static int s6e63m0_gamma_ctl(struct s6e63m0 *lcd, int gamma) static int s6e63m0_ldi_init(struct s6e63m0 *lcd) { int ret, i; - const unsigned short *init_seq[] = { + static const unsigned short *init_seq[] = { seq_panel_condition_set, seq_display_condition_set, seq_gamma_setting, @@ -467,7 +467,7 @@ static int s6e63m0_ldi_init(struct s6e63m0 *lcd) static int s6e63m0_ldi_enable(struct s6e63m0 *lcd) { int ret = 0, i; - const unsigned short *enable_seq[] = { + static const unsigned short *enable_seq[] = { seq_stand_by_off, seq_display_on, };