Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752033AbdH3Dai (ORCPT ); Tue, 29 Aug 2017 23:30:38 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:42635 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751680AbdH3Dag (ORCPT ); Tue, 29 Aug 2017 23:30:36 -0400 Date: Tue, 29 Aug 2017 20:28:29 -0700 From: Guenter Roeck To: Arvind Yadav Cc: tomas.winkler@intel.com, wim@iguana.be, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org Subject: Re: watchdog: mei_wdt: constify mei_cl_device_id Message-ID: <20170830032829.GA14278@roeck-us.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1062 Lines: 26 On Sat, Aug 26, 2017 at 11:41:06AM +0530, Arvind Yadav wrote: > mei_cl_device_id are not supposed to change at runtime. All functions > working with mei_cl_device_id provided by work > with const mei_cl_device_id. So mark the non-const structs as const. > > Signed-off-by: Arvind Yadav Reviewed-by: Guenter Roeck > --- > drivers/watchdog/mei_wdt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/watchdog/mei_wdt.c b/drivers/watchdog/mei_wdt.c > index b29c6fd..ea60b29 100644 > --- a/drivers/watchdog/mei_wdt.c > +++ b/drivers/watchdog/mei_wdt.c > @@ -670,7 +670,7 @@ static int mei_wdt_remove(struct mei_cl_device *cldev) > #define MEI_UUID_WD UUID_LE(0x05B79A6F, 0x4628, 0x4D7F, \ > 0x89, 0x9D, 0xA9, 0x15, 0x14, 0xCB, 0x32, 0xAB) > > -static struct mei_cl_device_id mei_wdt_tbl[] = { > +static const struct mei_cl_device_id mei_wdt_tbl[] = { > { .uuid = MEI_UUID_WD, .version = MEI_CL_VERSION_ANY }, > /* required last entry */ > { }