From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754961AbbCRGuW (ORCPT ); Wed, 18 Mar 2015 02:50:22 -0400 Received: from mail-bn1on0056.outbound.protection.outlook.com ([157.56.110.56]:48032 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750766AbbCRGuT (ORCPT ); Wed, 18 Mar 2015 02:50:19 -0400 Date: Wed, 18 Mar 2015 07:50:10 +0100 From: Michal Simek User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Fabian Frederick , CC: , Michal Simek , =?windows-1252?Q?S=F6ren_Brinkmann?= , Anirudha Sarangi , John Linn , , Subject: Re: [PATCH 09/16 linux-next] net: xilinx: constify of_device_id array References: <1426617469-781-1-git-send-email-fabf@skynet.be> <1426617469-781-10-git-send-email-fabf@skynet.be> In-Reply-To: <1426617469-781-10-git-send-email-fabf@skynet.be> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-7.5.0.1018-21404.003 X-TM-AS-User-Approved-Sender: Yes;Yes;Yes Message-ID: X-EOPAttributedMessage: 0 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=michal.simek@xilinx.com; skynet.be; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:149.199.60.100;CTRY:US;IPV:NLI;EFV:NLI;BMV:1;SFV:NSPM;SFS:(10009020)(6009001)(438002)(24454002)(479174004)(51704005)(189002)(199003)(164054003)(377454003)(106466001)(87936001)(74316001)(65956001)(23746002)(65806001)(104016003)(47776003)(33656002)(50466002)(2950100001)(6806004)(19580405001)(19580395003)(62966003)(77156002)(92566002)(86362001)(575784001)(54356999)(50986999)(76176999)(53416004)(46102003)(83506001)(64126003)(65826006)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2FFO11HUB049;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;MLV:sfv;MX:1;A:1;LANG:; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2FFO11HUB049; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5002010)(5005006);SRVR:BY2FFO11HUB049;BCL:0;PCL:0;RULEID:;SRVR:BY2FFO11HUB049; X-Forefront-PRVS: 051900244E X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2015 06:50:16.1442 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.100];Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2FFO11HUB049 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/17/2015 07:37 PM, Fabian Frederick wrote: > of_device_id is always used as const. > (See driver.of_match_table and open firmware functions) > > Signed-off-by: Fabian Frederick > --- > drivers/net/ethernet/xilinx/ll_temac_main.c | 2 +- > drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +- > drivers/net/ethernet/xilinx/xilinx_emaclite.c | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c > index dbcbf0c..690a4c3 100644 > --- a/drivers/net/ethernet/xilinx/ll_temac_main.c > +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c > @@ -1157,7 +1157,7 @@ static int temac_of_remove(struct platform_device *op) > return 0; > } > > -static struct of_device_id temac_of_match[] = { > +static const struct of_device_id temac_of_match[] = { > { .compatible = "xlnx,xps-ll-temac-1.01.b", }, > { .compatible = "xlnx,xps-ll-temac-2.00.a", }, > { .compatible = "xlnx,xps-ll-temac-2.02.a", }, > diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c > index a6d2860..28b7e7d 100644 > --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c > +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c > @@ -48,7 +48,7 @@ > #define AXIENET_REGS_N 32 > > /* Match table for of_platform binding */ > -static struct of_device_id axienet_of_match[] = { > +static const struct of_device_id axienet_of_match[] = { > { .compatible = "xlnx,axi-ethernet-1.00.a", }, > { .compatible = "xlnx,axi-ethernet-1.01.a", }, > { .compatible = "xlnx,axi-ethernet-2.01.a", }, > diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c > index 9d4ce38..2111b91 100644 > --- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c > +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c > @@ -1231,7 +1231,7 @@ static struct net_device_ops xemaclite_netdev_ops = { > }; > > /* Match table for OF platform binding */ > -static struct of_device_id xemaclite_of_match[] = { > +static const struct of_device_id xemaclite_of_match[] = { > { .compatible = "xlnx,opb-ethernetlite-1.01.a", }, > { .compatible = "xlnx,opb-ethernetlite-1.01.b", }, > { .compatible = "xlnx,xps-ethernetlite-1.00.a", }, > Acked-by: Michal Simek Thanks, Michal