From patchwork Thu Feb 4 17:27:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 12068039 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E11B5C433DB for ; Thu, 4 Feb 2021 17:28:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9BE4B64DD6 for ; Thu, 4 Feb 2021 17:28:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237893AbhBDR2k (ORCPT ); Thu, 4 Feb 2021 12:28:40 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:58248 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238556AbhBDR2d (ORCPT ); Thu, 4 Feb 2021 12:28:33 -0500 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1l7iQ1-00032K-10; Thu, 04 Feb 2021 17:27:49 +0000 From: Colin King To: Hans de Goede , Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] HID: lg-g15: make a const array static, makes object smaller Date: Thu, 4 Feb 2021 17:27:48 +0000 Message-Id: <20210204172748.107406-1-colin.king@canonical.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Colin Ian King Don't populate the const array led_names on the stack but instead make it static. Makes the object code smaller by 79 bytes: Before: text data bss dec hex filename 19686 7952 256 27894 6cf6 drivers/hid/hid-lg-g15.o After: text data bss dec hex filename 19543 8016 256 27815 6ca7 drivers/hid/hid-lg-g15.o (gcc version 10.2.0) Signed-off-by: Colin Ian King --- drivers/hid/hid-lg-g15.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/hid-lg-g15.c b/drivers/hid/hid-lg-g15.c index fcaf8466e627..bfbba0d41933 100644 --- a/drivers/hid/hid-lg-g15.c +++ b/drivers/hid/hid-lg-g15.c @@ -647,7 +647,7 @@ static void lg_g15_input_close(struct input_dev *dev) static int lg_g15_register_led(struct lg_g15_data *g15, int i) { - const char * const led_names[] = { + static const char * const led_names[] = { "g15::kbd_backlight", "g15::lcd_backlight", "g15::macro_preset1",