[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <24d4b0f2-d8bb-c730-4c37-a8a7c4e07a08@nvidia.com>
Date: Mon, 5 Jul 2021 22:31:22 +0530
From: Vidya Sagar <vidyas@...dia.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
<thierry.reding@...il.com>, <lorenzo.pieralisi@....com>,
<robh@...nel.org>, <bhelgaas@...gle.com>, <jonathanh@...dia.com>
CC: <linux-tegra@...r.kernel.org>, <linux-pci@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH 3/3] PCI: tegra: make const array err_msg static
Reviewed-by: Vidya Sagar <vidyas@...dia.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@...adoo.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",
>
Powered by blists - more mailing lists