From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756004AbeAHIij (ORCPT + 1 other); Mon, 8 Jan 2018 03:38:39 -0500 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:42707 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755133AbeAHIih (ORCPT ); Mon, 8 Jan 2018 03:38:37 -0500 Message-ID: <1515400713.3202.2.camel@pengutronix.de> Subject: Re: [PATCH] gpu: ipu-v3: make array 'int_reg' static, shrinks object size From: Philipp Zabel To: Colin King , dri-devel@lists.freedesktop.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 08 Jan 2018 09:38:33 +0100 In-Reply-To: <20180106172809.19913-1-colin.king@canonical.com> References: <20180106172809.19913-1-colin.king@canonical.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi Colin, On Sat, 2018-01-06 at 17:28 +0000, Colin King wrote: > From: Colin Ian King > > Don't populate the const read-only array 'int_reg' on the stack but instead > make it static. Makes the object code smaller by over 80 bytes: > > Before: > text data bss dec hex filename > 28024 8936 192 37152 9120 drivers/gpu/ipu-v3/ipu-common.o > > After: > text data bss dec hex filename > 27794 9080 192 37066 90ca drivers/gpu/ipu-v3/ipu-common.o > > (gcc version 7.2.0 x86_64) > > Signed-off-by: Colin Ian King Thank you for the patch. > --- > drivers/gpu/ipu-v3/ipu-common.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c > index 658fa2d3e40c..babf1aee7ca5 100644 > --- a/drivers/gpu/ipu-v3/ipu-common.c > +++ b/drivers/gpu/ipu-v3/ipu-common.c > @@ -1089,7 +1089,7 @@ static void ipu_irq_handler(struct irq_desc *desc) > { > struct ipu_soc *ipu = irq_desc_get_handler_data(desc); > struct irq_chip *chip = irq_desc_get_chip(desc); > - const int int_reg[] = { 0, 1, 2, 3, 10, 11, 12, 13, 14}; > + static const int int_reg[] = { 0, 1, 2, 3, 10, 11, 12, 13, 14}; > > chained_irq_enter(chip, desc); There's the same issue in ipu_irq_err_handler right below: ----------8<---------- diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c index babf1aee7ca58..48685cddbad1b 100644 --- a/drivers/gpu/ipu-v3/ipu-common.c +++ b/drivers/gpu/ipu-v3/ipu-common.c @@ -1102,7 +1102,7 @@ static void ipu_err_irq_handler(struct irq_desc *desc)  {         struct ipu_soc *ipu = irq_desc_get_handler_data(desc);         struct irq_chip *chip = irq_desc_get_chip(desc); -       const int int_reg[] = { 4, 5, 8, 9}; +       static const int int_reg[] = { 4, 5, 8, 9};           chained_irq_enter(chip, desc);   ---------->8---------- If you don't mind, I'll amend this change. regards Philipp