Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754694AbdFWJmO (ORCPT ); Fri, 23 Jun 2017 05:42:14 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:39572 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754497AbdFWJmN (ORCPT ); Fri, 23 Jun 2017 05:42:13 -0400 Date: Fri, 23 Jun 2017 11:41:41 +0200 From: Simon Horman To: Arvind Yadav Cc: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: Re: [PATCH] PCI: rcar-gen2: make of_device_ids const Message-ID: <20170623094141.GB24191@verge.net.au> References: <99e5ddc3b23962b22740dc93113d178f6f98df2f.1498210098.git.arvind.yadav.cs@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <99e5ddc3b23962b22740dc93113d178f6f98df2f.1498210098.git.arvind.yadav.cs@gmail.com> Organisation: Horms Solutions BV User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1042 Lines: 30 On Fri, Jun 23, 2017 at 02:59:52PM +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. > > Signed-off-by: Arvind Yadav Acked-by: Simon Horman > --- > drivers/pci/host/pci-rcar-gen2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c > index 8534859..6f87968 100644 > --- a/drivers/pci/host/pci-rcar-gen2.c > +++ b/drivers/pci/host/pci-rcar-gen2.c > @@ -429,7 +429,7 @@ static int rcar_pci_probe(struct platform_device *pdev) > return 0; > } > > -static struct of_device_id rcar_pci_of_match[] = { > +static const struct of_device_id rcar_pci_of_match[] = { > { .compatible = "renesas,pci-r8a7790", }, > { .compatible = "renesas,pci-r8a7791", }, > { .compatible = "renesas,pci-r8a7794", }, > -- > 1.9.1 >