Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752033AbdGBVtf (ORCPT ); Sun, 2 Jul 2017 17:49:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:54100 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751894AbdGBVte (ORCPT ); Sun, 2 Jul 2017 17:49:34 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C800822BE2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=helgaas@kernel.org Date: Sun, 2 Jul 2017 16:49:32 -0500 From: Bjorn Helgaas To: Arvind Yadav Cc: bhelgaas@google.com, po.liu@nxp.com, paul.gortmaker@windriver.com, lorenzo.pieralisi@arm.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] PCI: xilinx: make of_device_ids const. Message-ID: <20170702214932.GI18324@bhelgaas-glaptop.roam.corp.google.com> References: <5e1534021d712fa92cc0178313daeeb22e34798d.1497937235.git.arvind.yadav.cs@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5e1534021d712fa92cc0178313daeeb22e34798d.1497937235.git.arvind.yadav.cs@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1473 Lines: 42 On Tue, Jun 20, 2017 at 11:17:48AM +0530, Arvind Yadav wrote: > of_device_ids are not supposed to change at runtime. All functions > working with of_device_ids provided by work with const > of_device_ids. So mark the non-const structs as const. > > File size before: > text data bss dec hex filename > 195 600 0 795 31b drivers/pci/host/pcie-xilinx.o > > File size after constify xilinx_pcie_of_match: > text data bss dec hex filename > 595 184 0 779 30b drivers/pci/host/pcie-xilinx.o > > Signed-off-by: Arvind Yadav Applied to pci/host-xilinx for v4.13, thanks! > --- > drivers/pci/host/pcie-xilinx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c > index 2fe2df5..b621cb5 100644 > --- a/drivers/pci/host/pcie-xilinx.c > +++ b/drivers/pci/host/pcie-xilinx.c > @@ -696,7 +696,7 @@ static int xilinx_pcie_probe(struct platform_device *pdev) > return err; > } > > -static struct of_device_id xilinx_pcie_of_match[] = { > +static const struct of_device_id xilinx_pcie_of_match[] = { > { .compatible = "xlnx,axi-pcie-host-1.00.a", }, > {} > }; > -- > 1.9.1 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel