linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vidya Sagar <vidyas@nvidia.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	<thierry.reding@gmail.com>, <lorenzo.pieralisi@arm.com>,
	<robh@kernel.org>, <bhelgaas@google.com>, <jonathanh@nvidia.com>
Cc: <linux-tegra@vger.kernel.org>, <linux-pci@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH 3/3] PCI: tegra: make const array err_msg static
Date: Mon, 5 Jul 2021 22:31:22 +0530	[thread overview]
Message-ID: <24d4b0f2-d8bb-c730-4c37-a8a7c4e07a08@nvidia.com> (raw)
In-Reply-To: <5f3f35296b944b94546cc7d1e9cc6186484620d8.1620148539.git.christophe.jaillet@wanadoo.fr>

Reviewed-by: Vidya Sagar <vidyas@nvidia.com>

On 5/4/2021 10:48 PM, Christophe JAILLET wrote:
> Don't populate the array err_msg on the stack but instead make it
> static. Makes the object code smaller by 64 bytes.
> 
> While at it, add a missing const, as reported by checkpatch.
> 
> Compiled with gcc 11.0.1
> 
> Before:
> $ size drivers/pci/controller/pci-tegra.o
>     text	   data	    bss	    dec	    hex	filename
>    25623	   2844	     32	  28499	   6f53	drivers/pci/controller/pci-tegra.o
> 
> After:
> $ size drivers/pci/controller/pci-tegra.o
>     text	   data	    bss	    dec	    hex	filename
>    25559	   2844	     32	  28435	   6f13	drivers/pci/controller/pci-tegra.o
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>   drivers/pci/controller/pci-tegra.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c
> index fe8e21ce3e3d..b1250b15d290 100644
> --- a/drivers/pci/controller/pci-tegra.c
> +++ b/drivers/pci/controller/pci-tegra.c
> @@ -764,7 +764,7 @@ static int tegra_pcie_map_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
>   
>   static irqreturn_t tegra_pcie_isr(int irq, void *arg)
>   {
> -	const char *err_msg[] = {
> +	static const char * const err_msg[] = {
>   		"Unknown",
>   		"AXI slave error",
>   		"AXI decode error",
> 

  reply	other threads:[~2021-07-05 17:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-04 17:17 [PATCH 1/3] PCI: tegra: Fix OF node reference leak Christophe JAILLET
2021-05-04 17:17 ` [PATCH 2/3] PCI: tegra: Use 'seq_puts' instead of 'seq_printf' Christophe JAILLET
2021-07-05 17:01   ` Vidya Sagar
2021-05-04 17:18 ` [PATCH 3/3] PCI: tegra: make const array err_msg static Christophe JAILLET
2021-07-05 17:01   ` Vidya Sagar [this message]
2021-07-05 22:31   ` Krzysztof Wilczyński
2021-07-07 18:24     ` Christophe JAILLET
2021-07-07 19:52       ` Krzysztof Wilczyński
2021-06-22 10:42 ` [PATCH 1/3] PCI: tegra: Fix OF node reference leak Lorenzo Pieralisi
2021-07-05 17:00 ` Vidya Sagar
2021-08-05 10:43 ` Lorenzo Pieralisi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24d4b0f2-d8bb-c730-4c37-a8a7c4e07a08@nvidia.com \
    --to=vidyas@nvidia.com \
    --cc=bhelgaas@google.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=jonathanh@nvidia.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=robh@kernel.org \
    --cc=thierry.reding@gmail.com \
    --subject='Re: [PATCH 3/3] PCI: tegra: make const array err_msg static' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).