From patchwork Fri Sep 6 08:11:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 11134681 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F2801708 for ; Fri, 6 Sep 2019 08:11:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5AC8D206A1 for ; Fri, 6 Sep 2019 08:11:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731067AbfIFILg (ORCPT ); Fri, 6 Sep 2019 04:11:36 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:58450 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726263AbfIFILg (ORCPT ); Fri, 6 Sep 2019 04:11:36 -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 1i69LB-0005py-VI; Fri, 06 Sep 2019 08:11:34 +0000 From: Colin King To: Sylwester Nawrocki , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: s3c-camif: make array 'registers' static const, makes object smaller Date: Fri, 6 Sep 2019 09:11:33 +0100 Message-Id: <20190906081133.22543-1-colin.king@canonical.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Colin Ian King Don't populate the array 'registers' on the stack but instead make it static const. Makes the object code smaller by 45 bytes. Before: text data bss dec hex filename 17364 5000 0 22364 575c platform/s3c-camif/camif-regs.o After: text data bss dec hex filename 17255 5064 0 22319 572f platform/s3c-camif/camif-regs.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King --- drivers/media/platform/s3c-camif/camif-regs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/s3c-camif/camif-regs.c b/drivers/media/platform/s3c-camif/camif-regs.c index 1a65532dc36d..e80204f5720c 100644 --- a/drivers/media/platform/s3c-camif/camif-regs.c +++ b/drivers/media/platform/s3c-camif/camif-regs.c @@ -553,7 +553,7 @@ void camif_hw_disable_capture(struct camif_vp *vp) void camif_hw_dump_regs(struct camif_dev *camif, const char *label) { - struct { + static const struct { u32 offset; const char * const name; } registers[] = {